tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Log4j vs JULI configuration discrepancy
Date Fri, 07 Aug 2009 20:39:44 GMT
Eric B. wrote:
> Hi,
> 
> I'm not sure if there is anything that can be done about this, but I just
> tried switching from Tomcat's standard JULI logging to Log4j implementation
> following the docs at http://tomcat.apache.org/tomcat-6.0-doc/logging.html.
> Overall, everything works as expected, although I found one signficiant
> discrepancy between the two systems.
> 
> In JULI, the logging.properties file can be place in
> ${catalina.base}/conf/logging.properties, whereas Log4j expects it in
> ${catalina.home}/lib/log4j.properties.  I am assuming that it is log4j which
> is searching for it as part of the class path.
> 
> Although this may not seem overly significant, it does become quite so if
> you have multiple tomcat installations with a single tomcat binary install.
> Whereas with JULI, you can define individual logging based on the base
> directory, with log4j, it would apply to every installation.
> 
> Is there a workaround for this, or just one of those things that you have to
> learn to live with?

In catalina.properties, modify the following entry as shown:
common.loader=${catalina.base}/lib,${catalina.home}/lib,${catalina.home}/lib/*.jar

then you can place log4j.properties in CATALINA_BASE/lib

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message