Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

our TomCat 6 is running on a Windows Server 2003 server producing some logs on Program Files\Apache Software Foundation\Tomcat 6.0\logs folder.

Only catalina.YYYY-MM-DD.log rotates every night.

Admin. Host-Manager. Jakarta. LocalHost. Manager. stderr. stdout does not roate and are dated at the last server restart date. These files are most empty and always locked.

How can I set TomCat to rotate all these logs every night (if possible without server/service restart)?

Thank you in advance for help.

share|improve this question

In Linux (and FreeBSD) we have logrotate. On Windows, I think you can compile its source against Cygwin.

logrotate source:

Cygwin installer:

Tip for compiling logrotate on Cygwin:

share|improve this answer
Installing cygwin may be a solution for someone, but after some research I forund out that there is a tool called rotatelogs which comes out-of-the-box with Apache. It can be configured for log rotation editing httpd.conf. An example would be: #daily rotation CustomLog "| D:\Progra~1\Apache~1\Apache\bin\rotatelogs.exe logs\access%Y_%m_%d_%H_%M_%S.log 86400 -300" common Some blogs advertise that rotatelogs is quite buggy, so after some time you can find many instances of rotatelogs in your process list. At the moment it is not clear to me if there is a solution for this issue. – Danilo Brambilla Aug 16 '11 at 9:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.