[logback-user] Tomcat 5.5 and LogbackValve

Ceki Gulcu ceki at qos.ch
Thu Aug 6 20:23:07 CEST 2009


Hello,

Have you added

<Valve className="ch.qos.logback.access.tomcat.LogbackValve"/>

to server.xml?

Moreover, is logback-access printing its internal status on the console? (It 
does that automatically unless instructed otherwise.)

BR

Chu, William wrote:
> Hi all,
> 
>  
> 
> I tried searching through the archives for any suggestions or answers to 
> my dilemma so I must resort to posting this question.
> 
>  
> 
> I’m attempting to use the LogbackValve with Tomcat 5.5 and I’m not 
> achieving the results that I expected.  What I’d like to do is have 
> Tomcat use LogbackValve instead of 
> org.apache.catalina.valves.FastCommonAccessLogValve.  I attempted to 
> follow the instructions detailed on this page, 
> http://logback.qos.ch/access.html#tomcat, but to no avail.  No log file 
> is created in the TOMCAT_HOME/logs directory which I would expect it to 
> do upon startup of Tomcat.  What am I missing?
> 
>  
> 
> Line in server.xml:
> 
> <Valve className="ch.qos.logback.access.tomcat.LogbackValve"/>
> 
>  
> 
> Logback-access.xml:
> 
> <configuration debug=”true”>
> 
>   <appender name="FILE"
> 
>     class="ch.qos.logback.core.rolling.RollingFileAppender">
> 
>     <File>access.log"</File>
> 
>     <rollingPolicy
> 
>       class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
> 
>       <FileNamePattern>access.%d{yyyy-MM-dd}.log.zip</FileNamePattern>
> 
>     </rollingPolicy>
> 
>  
> 
>                 <triggeringPolicy 
> class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
> 
>                                 <MaxFileSize>5MB</MaxFileSize>
> 
>                 </triggeringPolicy>
> 
>     <layout class="ch.qos.logback.access.PatternLayout">
> 
>       <Pattern>combined</Pattern>
> 
>     </layout>
> 
>   </appender>
> 
>  
> 
>   <appender-ref ref="FILE" />
> 
> </configuration>
> 
>  
> 
> Regards,
> 
>  
> 
> *William Chu*
> 
> Sr. Applications Developer
> 
> First American CoreLogic, Inc.
> 
>  
> 
> cid:830400118 at 10072008-0D3C
> 
> Direct: 714.250.5813
> 
> Email: wchu at facorelogic.com
> 
>  
> 
> ****************************************************************************************** 
> This message may contain confidential or proprietary information intended only for the use of the 
> addressee(s) named above or may contain information that is legally privileged. If you are 
> not the intended addressee, or the person responsible for delivering it to the intended addressee, 
> you are hereby notified that reading, disseminating, distributing or copying this message is strictly 
> prohibited. If you have received this message by mistake, please immediately notify us by  
> replying to the message and delete the original message and any copies immediately thereafter. 
> 
> Thank you. 
> ****************************************************************************************** 
> FACLD
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the Logback-user mailing list