[slf4j-user] Per-web-app logging with jars on the ser ver's classpath

Ceki Gülcü listid at qos.ch
Wed Mar 21 21:32:20 CET 2007


Hi Mark,

I don't see how implementing o.a.c.logging.Log and LogFactory with log4j 
helps around this problem. How do you avoid keeping a map of JCL adapters 
wrapping log4j loggers? If you don't keep a map, how do you avoid building 
a new JCL adapter object each time the LogFactory.getFactory gets called?

Does the above make sense?

At 11:31 PM 3/20/2007, Mark Stralka wrote:

>Jake and Ceki,
>
>Thank you for all your help and diligence in addressing this issue.  I've 
>solved
>the problem, at least to my own satisfaction, by using
>-Dlog4j.repositorySelector=JNDI and implementing the
>org.apache.commons.logging.Log and LogFactory to use Log4j 
>directly.  Basically,
>I took JCL's impl.Log4JLogger (v1.1), cut out the Log4j 1.2-specific code and
>put in code that works with 1.3alpha8.  Log4j is already used in my 
>organization
>and we already have websites deployed with log4j.properties files, so 
>moving to
>Logback isn't possible now but I will follow its progress if you see it as the
>successor to Log4j.
>
>Thank you again
>Mark

-- 
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