Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

logrotate source: https://fedorahosted.org/logrotate/

Cygwin installer: http://www.cygwin.com

Tip for compiling logrotate on Cygwin: http://cygwin.com/ml/cygwin/2009-11/msg00856.html

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

 
discard

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.