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.

link|improve this question

feedback

2 Answers

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

link|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
feedback

Perhaps this may be of help: http://nicerhttpd.blogspot.com/2008/11/logrotate-and-log4j.html

link|improve this answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Jacob Apr 17 '11 at 0:59
feedback

Your Answer

 
or
required, but never shown

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