tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Robert <>
Subject Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?
Date Thu, 03 Mar 2005 14:55:07 GMT
> Understandable.  I was a little dismayed to see that what had been more
> automatic in Tomcat-5.0.xx had become less so in Tomcat-5.5.  What I 
> mean is,
> in Tomcat-5.0.xx, one could add a <Logger> to the context 
> configuration file,
> deploy that with the webapp, and dynamically get a log file for
> ServletContext.log() output.  In Tomcat-5.5, one has to have this in 
> the logger
> config file at Tomcat startup, therefore forcing one to predict the 
> apps that
> will be deployed to the appserver during runtime
>  I was trying to achieve this with multiple
>> separate, one in the container (common/classes/) for
>> the uncaught stack trace and other general logging, and others in each
>> webapp.  With my setup below I was expecting to get THREE files:
>> catalina.out (with stdout/err), tomcat.log (with the container's log4j
>> output), and bar.log (with the webapp's log4j output, which I changed
>> from ServletContext.log() to use  Instead, I got only
>> catalina.out and tomcat.log, the latter containing everything that I
>> thought the webapp would be sending to bar.log.
> And this should have worked.  It works in every case I have ever 
> tried.  I
> suggest you double and triple check that you have log4j.jar in both 
> common/lib
> and WEB-INF/lib and make sure you have in both 
> common/classes
> and WEB-INF/classes.

OK, thanks to your vote of confidence in the method, I dug further and 
discovered that my WEB-INF/classes/ was never being 
found.  If I put the into the same jar (in 
WEB-INF/lib) with the class that was instantiating the Logger, it 
worked correctly.

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

View raw message