On 11/12/2011 04:14 PM, Steve Cohen wrote:
We have a custom appender that may itself need to issue logging
statements. But placing a logger in such a class causes various
exceptions on initialization and loading. So we are resorting to
System.out.println for lack of a better solution.

I suppose there must be a better way.
What would that be?


_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user


A technique that seems to work is to NOT declare a logger in the Appender class that you want to use one from, but instead create a static logger instance somewhere that is accessible through static methods. That way the logger does not need to be created at the time of appender instantiation.
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to