tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boris Unckel" <>
Subject Re: per-webapp logging problem with Tomcat 5.5
Date Mon, 27 Feb 2006 12:48:46 GMT

> Thanks for your explanation about why real per-webapp logging is 
> currently not possible with Tomcat 5.5 and Juli/java.util.logging. Is it 
> the same with Log4J?
Yes, naturally. You would have to place log4j.jar into your WEB-INF/lib and
the configuration into the webapp to get logger instances per webapp.
Additionally you must avoid any log4j.jar on the system/common/shared
classpath to avoid conflicts.

Again the problem: The librarys aquire a logger with the same name (usually
the package name). The webapp or classloader or any other distinct key is
not part of that. If you centraly configure "" to log to
file1 ANY log statement of a logger with that name will log to
This is a common problem of all available logging APIs.
I fully understand your argumentation, but I think the advantage of
per-webapp logging is much more worth than "no configuration in the WAR".

If you wish to be Tomcat independent for that try:
x4juli does not solve your actual problem, but is not Tomcat dependent.
Additionally it provides a native JCL implementation which is an performance


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

View raw message