On Thu, Apr 2, 2009 at 9:55 PM, Caldarale, Charles R <chuck.caldar...@unisys.com> wrote: >> From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] >> Subject: And even further into the black magic of logging configuration >> within tomcat... >> >> So, why didn't log4j try to find the log4j.properties >> file for the second webapp? > > Verify that you have separate log4j.properties files in the WEB-INF/classes > directories of each webapp, and that there's not a permissions problem with > them being accessed by whatever userid Tomcat is running under.
Yep. It exists. > > Where is your log4j.jar located? You should have separate ones in each > webapp's WEB-INF/lib directory; Yes again. I think that _this_ bug explains why so many people have issues getting log4j configured in tomcat. If you deploy more than one webapp, log4j doesn't attempt to self-configure in the second or any subsequent webapps. I'm going to go hunt in some log4j code, and try to understand how log4j goes about deciding if it should search for a log4j.properties file. But I suspect that the problem is in Tomcat - Something is probably being stored in a class loader that is visible to all webapps, when it should not be. So Log4j thinks that it is already configured in webapp 2 - but it's not, because all of the appenders, etc, are in the classloader specific to webapp 1. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org