Note that there are some explanatory texts on larger screens.

plurals
  1. PONo Output in the log file generated by logback
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/8620848/how-to-setup-logback-with-tomcat-6-on-windows">How To Setup Logback with Tomcat 6 on Windows</a> </p> </blockquote> <p>I have setup logback on my tomcat6 on Windows 7, copied [logback-access-0.9.13],[logback-classic-0.9.13],[logback-core-0.9.13] in $TOMCAT_HOME/lib and copied logback-access.xml in $TOMCAT_HOME/conf. The xml file is as follows:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;configuration&gt; &lt;appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt; &lt;append&gt;true&lt;/append&gt; &lt;File&gt;${catalina.home}/logs/aggregator.log&lt;/File&gt; &lt;encoder&gt; &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] \(%class{25}:%line\) - %msg%n&lt;/pattern&gt; &lt;/encoder&gt; &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt; &lt;fileNamePattern&gt;aggregator.log.%d{yyyy-MM-dd}.gz&lt;/fileNamePattern&gt; &lt;/rollingPolicy&gt; &lt;/appender&gt; &lt;appender name="console" class="ch.qos.logback.core.ConsoleAppender"&gt; &lt;encoder&gt; &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] \(%class{25}:%line\) - %msg%n&lt;/pattern&gt; &lt;/encoder&gt; &lt;/appender&gt; &lt;root level="DEBUG"&gt; &lt;appender-ref ref="file"/&gt; &lt;appender-ref ref="console"/&gt; &lt;/root&gt; &lt;/configuration&gt; </code></pre> <p>Also added the following line in server.xml:</p> <pre><code>&lt;Valve className="ch.qos.logback.access.tomcat.LogbackValve"/&gt; </code></pre> <p>The problem is that the log file is created but nothing is logged in it. The tomcat setup is just basic, normal startup should be logged in the log file.</p> <p>Can somebody help me, please?</p> <p>P.S. I am using older version of logback as I have read somewhere the newer version will not work with tomcat6.</p> <p>Thanks Noman A.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload