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
Re: Where to place log4j.properties
2010/5/25 Søren Blidorf so...@nolas.dk: Hi. Where in my war file should log4j.properties be? I have it in WEB-INF/classes but it seems like it can’t be found. Der skal den være på runtime. I get: No appender could be found for logger (org.apache.jasper.JspC) when I compile. Hvad er dit logging-API -- refererer din javakode direkte til log4j eller bruger du commons-logging eller tilsvarende? Du skal også have log4j.jar i WEB-INF/lib Faktisk tror jeg at den citerede fejlmeddelse betyder at commons-logging ikke kan finde log4j.jar, så check lige at den er i WEB-INF/lib mvh Erik - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Container logging for Tomcat 6.0.x with log4j-1.2.14
2007/3/9, Filip Hanik - Dev Lists [EMAIL PROTECTED]: you'll need the modified juli adapter, http://tomcat.apache.org/dev/dist/m2-repository/org/apache/tomcat/extras/ Is there any reason that the extras stuff isn't made available in compiled form on the main download pages http://mirror-path//tomcat/tomcat-6/v6.0.10/bin ? I would certainly find it easier to use some of this stuff if I don't need to compile it from source. - Erik - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Documentation nits in tc6's logging.html
Looking through the Tomcat 6 docs, I noticed the following in logging.html about how to use log4j for logging with extras/tomcat-juli.jar: the 4th step about replacing tomcat-juli.jar is ok, but the 5th step about adding tomcat-juli-adapters.jar looks like it has been copied too quickly from step 4. Suggested fix: diff -c logging.xml~ logging.xml *** logging.xml~Sun Dec 24 10:28:34 2006 --- logging.xml Sat Jan 6 11:14:03 2007 *** *** 93,99 liReplace code$CATALINA_HOME/bin/tomcat-juli.jar/code with codeoutput/extras/tomcat-juli.jar/code./li ! liPlace code$CATALINA_HOME/bin/tomcat-juli-adapters.jar/code in $CATALINA_HOME/lib./li liStart Tomcat/li --- 93,99 liReplace code$CATALINA_HOME/bin/tomcat-juli.jar/code with codeoutput/extras/tomcat-juli.jar/code./li ! liPlace codeoutput/extras/tomcat-juli-adapters.jar/code in $CATALINA_HOME/lib./li liStart Tomcat/li A few paragraphs further down in the same file is a reference to Tomcat 5.5 that should probably be Tomcat 6. - Erik - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]