tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boris Unckel" <>
Subject Re: logging does not work in my webapp
Date Tue, 05 Sep 2006 10:35:07 GMT

-------- Original-Nachricht --------
Datum: Tue, 05 Sep 2006 11:50:34 +0200
Von: David Delbecq <>
An: Tomcat Users List <>
Betreff: Re: logging does not work in my webapp

> First, problem solved. It appear a 3rd party library include in my
> webapp was doing a manual configuration of log4j, resetting the root
> logger and sending logs to some file in the middle of nowhere.
OK, so something completely different.
> Thanks for information. Am just curious, you tell me to put my
> commons-logging and log4j in my webapp (that's what i was doing before
> reading docs). However, if i read well the docs (tomcat 5.5) on
> classloader, the commons-logging in tomcat/bin will take precedence
> because it's a system class and as such can not be overwritten by the
> webapp ////$CATALINA_HOME/bin/commons-logging-api.jar is in system
> classloader. //
> May the doc be wrong about it? could my commons-logging in webapp take
> precedence of the one in tomcat?
> //
You are right, it is documented at
but JCL is classloader-aware, especially 1.1 has been closely tested into that direction.
If you have commons-logging-api.jar (1.1) in you TOMCAT_ROOT/bin and commons-logging.jar in
WEB-INF/lib and additionally the library of your choice (in your case: log4j) in WEB-INF/lib,
commons-logging will detect that and choose the correct library.
If you have it in commons/lib any webapp will use log4j with the configuration "found first"
(random) if there is more than one.


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message