[logback-user] How should I unit test my programmatic setup of appenders?
ceki
ceki at qos.ch
Thu Jul 26 22:19:07 CEST 2012
As a general rule, whatever configuration is done via configuration
files can be done programmatically. There are many unit tests creating
and configuring appenders programmatically.
On 26.07.2012 20:33, Noremac wrote:
> I want to unit test some methods I have for programmatically adding appenders
> to the root logger. It seems that I don't have full access to the things I
> have set, specifically the marker evaluator.
>
> Additionally, as the markerEvaluator is not a filter, I can't call the
> getFilterChainDecision method.
>
> Is there a better approach to doing this? I've seen posted the idea of using a
> ListLogger to perform logging and then query to see if the correct logs went
> through, but that doesn't test "my" appender.
>
>
--
Ceki
http://tinyurl.com/proLogback
More information about the Logback-user
mailing list