How to automatically rotate catalina.out daily or when it becomes bigger than 5M
1. Create this file
/etc/logrotate.d/tomcat |
2. Copy the following contents into the above file
/var/log/tomcat/catalina.out { copytruncate daily rotate 7 compress missingok size 5M } |