tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Cosenza" <>
Subject Re: separate log4j configurations
Date Tue, 01 Feb 2005 20:26:53 GMT
If you will configure log4j instances which are in the same classloader,
they will conflict.

      /      \
 Catalina   Shared
             /   \
        Webapp1  Webapp2 ...

In other words, your webapp log4j.configuration will override your
tomcat-wide log4j.configuration which may annoy you

----- Original Message -----
From: "Tony Tomcat" <>
To: <>
Sent: Tuesday, February 01, 2005 8:50 PM
Subject: separate log4j configurations

> Is it safe to have 1 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/
> 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 file in that webapp.
> $TOMCAT_HOME/webapps/test/WEB-INF/classes/
> 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 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:
> For additional commands, e-mail:

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