tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Woon <>
Subject Re: Logging and Tomcat 5.0.16
Date Sat, 10 Jan 2004 22:44:55 GMT
Shapira, Yoav wrote:

> >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.
> Yes, there's a good reason: tomcat internals use commons-logging to do
> their logging.

Yes, but why put it in the CLASSPATH and not in /server/lib?  Doesn't 
this mean that any configuration would affect all webapps?

> >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.
> Yes, add a commons-logging configuration file to common/classes, e.g. as
> suggested in this link off the tomcat FAQ:

I saw that, and that has a config file for log4j, not commons-logging.  
There is no way to actually filter the output through the 
commons-logging config file.  I'd like a way to only suppress catalina's 

If I use a, it means I'd need to install log4j in 
/common/lib.  It also means that I have to specify all logging config 
info in /common/classes instead of on a per-webapp basis (see

> >3) In any case, why doesn't Tomcat just come with commons-logging.jar
> >and log4j.jar bundled in /server/libs?
> Tomcat does not want to tie you into a specific logging implementation,
> e.g. log4j.  Tomcat wants to make its logging available to webapps by
> default, so server/lib is not a possible location.

But doesn't this just lead to classloader hell?

> >4) Is there a FAQ or HOWTO on recommended approaches to handling
> logging
> >in Tomcat somewhere?
> It won't hurt to search the archives of this list, there are many
> answers there.  The link above also has some information.

I'm sorry, but I have searched the archives, and there just doesn't seem 
to be one conclusive answer.  I see a lot of e-mails talking about the 
use of commons-logging and how it causes all sorts of classloader 

What I'm looking for is a way to specify logging configuration for 
catalina that is independent of any webapps I may have.

I don't want 1 for everything.  Is this possible?  If 
so, how?  I'd be more than happy to write up a HOW-TO if I could just 
figure this out, but I haven't stumbled across anything that works yet.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message