A script to rotate Tomcat's catalina.out
We use 'copytruncate' so we don't need to restart tomcat in a postrotate script. Some logging data may be lost between copying and truncating the logfile but this is a tradeoff against having to restart tomcat.
/etc/logrotate.d/tomcat:
/usr/local/tomcat/logs/catalina.out {
weekly
rotate 52
copytruncate
notifempty
missingok
}
This will keep a year's worth of weekly logs.
