title: How to rotate tomcat logs in Windows? What is the best method?
body: <p>I am really fed up in not being able to solve the tomcat log rotation problem in one our windows server after putting countless hours in it and after trying out various solutions.</p>
  
  <ul>
  <li><strong>Environment:</strong> Java 1.6x, Tomcat 6 (running as service), log4j 1.2, Server 2003 32-bit </li>
  </ul>
  
  <p>Methods tried so far:</p>
  
  <ol>
  <li><p><code>cronolog</code> didn't work, no files where being created after setting it up.</p></li>
  <li><p>Managed to configure <code>log4j</code> with <code>DailyRollingFile</code> appender globally for Tomcat, the log files are being created without extension and are not being rotated.</p></li>
  <li><p>Tried <code>DatedFileAppender</code> too, but didn't get much success.</p></li>
  <li><p>Tried <code>log4jna</code> based <code>Windows Event Log appender</code> for log4j, there didn't get success</p></li>
  </ol>
  
  <p>Please suggest an easy method to finish this task.</p>