[slf4j-user] log4j-over-slf4j Category does not have addAppender method?

Ceki Gulcu ceki at qos.ch
Fri Jul 10 10:35:35 CEST 2009


Hello Paul,

Contrary to jcl-over-slf4j which is a complete replacement for
commons-logging.jar, log4j-over-slf4j is not a complete replacement
for log4j.jar.

log4j-over-slf4j will work as long as Logger/Category, and
Level/Priority classes are invoked. You cannot invoke or refer to
other classes such as Appender or Layout.

HTH,

Paul G wrote:
> I have some legacy code which has a dependency on log4j 1.2.8 in this code it
> calls Logger.addAppender which is actually on the super class Category. When
> I run the code with log4j-over-slf4j the code bombs out as it calls
> Logger.addAppender which is not implemented in the slf4j log4j bridge. Is
> this a known issue, any way I can patch the code to work?
> 
> Cheers
> Paul
> :-( 

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch



More information about the slf4j-user mailing list