[logback-user] How should I unit test my programmatic setup of appenders?

Noremac cam at byu.edu
Thu Jul 26 20:33:36 CEST 2012


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.




More information about the Logback-user mailing list