<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Bitstream Vera Sans Mono">In our production environment,
where we have replaced log4j with logback under tomcat, I have the
following:<br>
<br>
/opt/jakarta-tomcat-5.5.9/server/lib (everything)<br>
-rw-rw-r-- 1 jason altos 24746 Mar 26 2005 catalina-ant.jar<br>
-rw-rw-r-- 1 jason altos 166594 Mar 26 2005
catalina-cluster.jar<br>
-rw-rw-r-- 1 jason altos 636165 Mar 26 2005 catalina.jar<br>
-rw-rw-r-- 1 jason altos 115234 Mar 26 2005
catalina-optional.jar<br>
-rw-rw-r-- 1 jason altos 63330 Mar 26 2005
catalina-storeconfig.jar<br>
-rw-rw-r-- 1 jason altos 109670 Mar 26 2005
commons-modeler.jar<br>
-rw-rw-r-- 1 jason altos 21642 Mar 26 2005
servlets-cgi.renametojar<br>
-rw-rw-r-- 1 jason altos 18062 Mar 26 2005
servlets-default.jar<br>
-rw-rw-r-- 1 jason altos 6008 Mar 26 2005
servlets-invoker.jar<br>
-rw-rw-r-- 1 jason altos 45677 Mar 26 2005
servlets-ssi.renametojar<br>
-rw-rw-r-- 1 jason altos 22060 Mar 26 2005
servlets-webdav.jar<br>
-rw-rw-r-- 1 jason altos 123399 Mar 26 2005 tomcat-ajp.jar<br>
-rw-rw-r-- 1 jason altos 19247 Mar 26 2005
tomcat-coyote.jar<br>
-rw-rw-r-- 1 jason altos 51679 Mar 26 2005 tomcat-http.jar<br>
-rw-rw-r-- 1 jason altos 245885 Mar 26 2005 tomcat-util.jar<br>
<br>
/opt/jakarta-tomcat-5.5.9/webapps/altos/WEB-INF/lib (logging-related
only)<br>
-rw-r--r-- 1 jason altos 15435 Aug 26 08:36
jcl104-over-slf4j.jar<br>
-rw-r--r-- 1 jason altos 9592 Aug 26 08:36
log4j-over-slf4j.jar<br>
-rw-r--r-- 1 jason altos 70919 Aug 26 08:36
logback-access.jar<br>
-rw-r--r-- 1 jason altos 120215 Aug 26 08:36
logback-classic.jar<br>
-rw-r--r-- 1 jason altos 186680 Aug 26 08:36 logback-core.jar<br>
-rw-r--r-- 1 jason altos 15345 Aug 26 08:36 slf4j-api.jar<br>
-rw-r--r-- 1 jason altos 7011 Aug 26 08:36 slf4j-jcl.jar<br>
<br>
Does that help?<br>
<br>
-jason<br>
<br>
<br>
</font><br>
whatever21 wrote:
<blockquote cite="mid:14958897.post@talk.nabble.com" type="cite">
<pre wrap="">I forgot to add that I also have logback-classic-0.9.8.jar in my
.../WEB-INF/lib and TOMCAT_HOME/lib directories.
whatever21 wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi, I'm having some problems getting Tomcat (version 6.0.14) access logs
to work in conjunction with Logback and my other loggers.
This is what my logback.xml looks like (its exploded into
../WEB-INF/classes/ when I deploy a new .war):
<configuration debug="true">
<!-- specify directories where logs should live -->
<substitutionProperty name="logEng.log.dir"
value="${base.log.dir}/loggingEngine"/>
<substitutionProperty name="targeting.log.dir"
value="${base.log.dir}/targeting"/>
<substitutionProperty name="normalize.log.dir"
value="${base.log.dir}/normalize"/>
<substitutionProperty name="cookie.dir"
value="/home/tomcat/globalHistory"/>
<appender name="LOGGINGENGINE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logEng.log.dir}/logEng.log</file>
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>
logEng-%d{yyyy-MM-dd}.log.gz
</FileNamePattern>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%d{yyyy/MM/dd HH:mm:ss ZZZ}\t%msg%n
</Pattern>
</layout>
</appender>
<appender name="TARGETING"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${targeting.log.dir}/targeting.log</file>
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>
targeting-%d{yyyy-MM-dd}.log.gz
</FileNamePattern>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%d{yyyy/MM/dd HH:mm:ss ZZZ}\t%msg%n
</Pattern>
</layout>
</appender>
<appender name="NORMALIZE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${normalize.log.dir}/normalize.log</file>
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>
normalize-%d{yyyy-MM-dd}.log.gz
</FileNamePattern>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%msg%n
</Pattern>
</layout>
</appender>
<appender name="COOKIE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${cookie.dir}/cookie.log</file>
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>
cookie-%d{yyyy-MM-dd}.log.gz
</FileNamePattern>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%msg%n
</Pattern>
</layout>
</appender>
<logger name="CookieLog" additivity="false">
<level value="INFO"/>
<appender-ref ref="COOKIE"/>
</logger>
<logger name="TargetingLog" additivity="false">
<level value="ALL"/>
<appender-ref ref="TARGETING"/>
</logger>
<logger name="NormalizeLog" additivity="false">
<level value="ALL"/>
<appender-ref ref="NORMALIZE"/>
</logger>
<root>
<level value="ALL"/>
<appender-ref ref="LOGGINGENGINE"/>
</root>
</configuration>
My logback configuration works like a charm but I get no access logs under
TOMCAT_HOME/logs
Under TOMCAT_HOME/lib/ I have the usual jars and I've added:
logback-access-0.9.8.jar
logback-core-0.9.8.jar
What should I have under ../WEB-INF/lib/?
I don't have much experience with logging in general (which is probably
apparent :)
Thanks,
Jennifer
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>