[slf4j-user] Should NOPLogger implement org.slf4j.spi.LocationAwareLogger? Dealing with appender startup problem

ownedthx sethcall at gmail.com
Mon Feb 22 01:57:34 CET 2010


Hi all,

I'm using a logback appender which logs during startup, causing a NOPLogger
to be created while the underlying library initializes.

In this specific scenario, I'm coercing a 3rd-party library out of direct
log4j usage by using the log4j-over-slf4j bridge.  However, the
Category.java implementation in the bridge will throw an exception if the
underlying logger (in this case, NOPLogger) does not implement the
LocationAwareLogger interface.

This seems wrong to me--seems to me the NOPLogger should implement
LocationAwareLogger, and NOP the log statement specific to that, just like
it does with all the other various log overloads it implements, instead of
causing the appender to fail to start.

Any thoughts on this?

By the way, I did stop the error by doing just what was recommended here...

Thanks,
Seth


-- 
View this message in context: http://n3.nabble.com/Should-NOPLogger-implement-org-slf4j-spi-LocationAwareLogger-Dealing-with-appender-startup-problem-tp326006p326006.html
Sent from the slf4j - user mailing list archive at Nabble.com.


More information about the slf4j-user mailing list