tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: Logging and Tomcat 5.0.16
Date Fri, 02 Jan 2004 14:53:37 GMT

Put log4j-1.2.8.jar in common/lib and put or log4j.xml in 
common/classes.  Works fine for me and I still use Log4j in my webapps, each 
with their own logging that doesn't interfere with anything else.  This is 
achieve be either adding log4j.jar to WEB-INF/lib of each webapp and/or using a 
repository selector where I can have a single instance of Log4j, yet have all 
apps log in their own private logger repository.


Quoting Mark Woon <>:

> Hi all,
> I apologize in advance for starting another logging thread, but I have
> some questions that no amount of googling and archive surfing can seem
> to answer:
> 1) Is there a reason why the script that comes bundled with
> Tomcat 5.0.16 adds commons-logging-api.jar to the CLASSPATH?  As far as
> I can tell, it's the only script that uses it.
> 2) Is there a recommended way to control what gets spewed into
> catalina.out?  The fact that all the messages I'm getting have an INFO
> tag would indicate that this should be possible.
> So far, the best I can come up with is to add commons-logging.jar and
> log4j.jar into /server/libs and adding in a in
> /server/classes.  This way I can still (theoretically) use
> commons-logging/log4j in my webapps' WEB-INF/lib without having to deal
> with classloader problems.
> I say theoretically because when I reload my webapp, log4j complains
> that it cannot find any appenders, so there's still something screwy
> going on that I haven't figure out yet.
> The other problem I have with this approach is that it seems to
> completely ignore the parameters in server.xml that purport to control
> the Logger's verbosity.
> 3) In any case, why doesn't Tomcat just come with commons-logging.jar
> and log4j.jar bundled in /server/libs?
> 4) Is there a FAQ or HOWTO on recommended approaches to handling logging
> in Tomcat somewhere?
> Thanks,
> -Mark
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message