If you install Tomcat from the CentOS repo it creates a logrotation file which will ensure that logs are rotated weekly. If you install Tomcat from the Loway repo no logrotation file is created. I would like to propose creating a /etc/logrotate.d/qm-tomcat6 file which is installed from the Loway Repo. The naming convention follows that of the tomcat init script Loway creates.
The default tomcat file looks as follows:
/etc/logrotate.d/tomcat5
/var/log/tomcat5/catalina.out {
copytruncate
weekly
rotate 52
compress
missingok
}
I think the log rotation should be a bit more aggressive and can deal with *.log:
/etc/logrotate.d/qm-tomcat6
/usr/local/queuemetrics/tomcat/logs/*.log {
notifempty
copytruncate
daily
size=+1024k
rotate 10
compress
missingok
}
/usr/local/queuemetrics/tomcat/logs/catalina.out {
notifempty
copytruncate
dateext
daily
size=+1024k
rotate 10
compress
missingok
}
I have gone through the manual steps to set this up in this thread:
http://forum.queuemetrics.com/index.php?topic=1441.0