That's exactly what I am trying to avoid :) I have a lot of web apps and developers that stand on their head for logging. My customers end up finding logs all over the place and enforcing it by convention is getting harder and harder. I'd like to configure logging for them rather than leave logging to their discretion. So I want the centralized log4j configuration that can insert the web app name into the file name that belongs to the tomcat installation.
dB. @ dblock.org Moscow|Geneva|Seattle|New York -----Original Message----- From: Erik Bertelsen [mailto:bertelsen.e...@gmail.com] Sent: Friday, June 18, 2010 8:37 AM To: Tomcat Users List Subject: Re: how can i configure Tomcat's log4j to log in a separate file for each webapp? 2010/6/18 dB. <dbl...@dblock.org>: > This question is all over the internet, without a satisfactory answer. > > We have a Tomcat deployment in which we install many web apps. We call this > thing a services host. It has a log4j configuration that forwards logs into a > file. I'd like to change the file pattern to include the name of the webapp, > so that we can get one file per web application. > > > * Is anyone doing that? I do this all the time. For applications using commons-logging, I place commons-logging.jar and log4j.jar in the webapp's WEB-INF/lib directory and log4j.properties in WEB-INF/classes. The same works if slf4j-api and slf4j-log4j12 is used instead of or in addition to commons-logging. I never add jar files used by individual webapps to tomcat's lib or any other directory shared by several webapps. kind regards - Erik --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org