tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Tomcat <tony.tom...@gmail.com>
Subject separate log4j configurations
Date Tue, 01 Feb 2005 19:50:20 GMT
Is it safe to have 1 log4j.properties setup for all of tomcat and then
override it for a webapp that might need slightly different logging?

For example..

I place log4j.jar and the Jakarta commons-logging.jar into the
$TOMCAT_HOME/common/lib directory and have a log4j properties file in
$TOMCAT_HOME/common/classes/log4j.properties

This properties file writes to ${catalina.home}/logs/all.out

Then I have a test webapp that I want in its own log4j output file so
I install a new log4j.properties file in that webapp.

$TOMCAT_HOME/webapps/test/WEB-INF/classes/log4j.properties

This properties file puts the output in ${catalina.home}/logs/test.out

This appears to work but I'm just wondering if this is the correct way
to go about it.

The reason I want my main logging configuration in common/classes is
because I want my operations team to control the logging instead of
the war file.   In the case of my test application I always want it to
log at the debug level and it is only installed in production briefly
so having the log4j.properties in the war file is fine and allows me
to keep it logging at debug even if the other apps are at WARN.

Any issues here?
Tony

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


Mime
View raw message