log4j rolling file (logs application)
<p>I have web application (struts2), and I want to manage the logs.</p>

<p>When I use </p>

<pre><code>&lt;appender name="dailyLog" class="org.apache.log4j.RollingFileAppender"&gt;
                &lt;param name="File" value="${catalina.base}/logs/test.log" /&gt;
                &lt;param name="DatePattern" value="'.'yyyy-MM-dd"/&gt;
                &lt;param name="Append" value="true"/&gt;
                &lt;param name="MaxFileSize" value="2KB"/&gt;
                &lt;param name="MaxBackupIndex" value="4"/&gt;
                &lt;layout class="org.apache.log4j.PatternLayout"&gt;
                        &lt;param name="ConversionPattern" value="%d{dd/MM/yyyy HH:mm:ss} [%-5p] %-30c{1} %x: %m\n"/&gt;
                &lt;/layout&gt;
        &lt;/appender&gt;
</code></pre>

<p>I have a rolling of file, but I have tomcat.out that contains a application logs.</p>

<p>When I use <code>org.apache.log4j.DailyRollingFileAppender</code>, I don't have  rolling logs but I have catalina.out static (logs of start, stop of tomcat only) </p>

<pre><code>&lt;appender name="dailyLog" class="org.apache.log4j.DailyRollingFileAppender"&gt;
                &lt;param name="File" value="${catalina.base}/logs/test.log" /&gt;
                &lt;param name="DatePattern" value="'.'yyyy-MM-dd"/&gt;
                &lt;param name="Append" value="true"/&gt;
                &lt;layout class="org.apache.log4j.PatternLayout"&gt;
                        &lt;param name="ConversionPattern" value="%d{dd/MM/yyyy HH:mm:ss} [%-5p] %-30c{1} %x: %m\n"/&gt;
                &lt;/layout&gt;
        &lt;/appender&gt; 
</code></pre>

<p>My question is: Can we have rotation of logs file + catalina.out (that contains only logs of restart of tomcat server)?</p>

<p>Thank you</p>