logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Log4j logging under Tomcat5 (was Re: Multiple Projects Using Same Logger)
Date Mon, 23 May 2005 05:09:43 GMT
At 10:27 PM 5/22/2005 +0000, you wrote:
 >Now I have an unrelated question: I run the webapp under Tomcat 5.x.  When
 >the output level of the root logger is set to DEBUG, and I have log4j props
 >under WEB-INF/classes, I get a *ton* of Tomcat-output to logs.  Is this
 >because Tomacat itself uses log4j, and is reacting to the setting?
 >
 >I've seen the same behavior from JSF, running under Sun Web Server.

Tomcat shouldn't pick that up at all unless you've added log4j.jar *and* 
commons-logging.jar (not commons-logging-api.jar which excluded support for 
Log4j) to common/lib.  If this were the case, commons-logging would find 
and use Log4j in preference to other logger implementations.  I'm not 
completely sure how classes in common/lib would see log4j.properties in 
WEB-INF/classes, though?  Log4j uses the thread context classloader to 
locate/load the property file, but the thread wouldn't have been started 
from the webapp, so I don't see how that would come into play here?  Do 
you, somehow, have WEB-INF/classes of your webapp in the system classpath 
or something?  But if you use the startup scripts, Tomcat eschews the 
system classpath.  Hmmmmm....  In any case, this is very odd.  I'm not sure 
how this would happen?


Jake


 >
 >Regards,
 >
 >--A


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message