Posts

Showing posts with the label Why is logrotate not running automatically ?

Log rotate (catalina.out) of Tomcat

Rotate Catalina.out of tomcat on On Linux (Centos 7) server By default, Catalina.out file will not be rotated. To rotate it I have used logrotate. First, understand the  logrotate utility   Create tomcat file under /etc/logrotate.d/  using below command                               sudo vi /etc/logrotate.d/tomcat Press i to enable insert mode, past below script into file                                                                /opt/app/tomcat/logs/catalina.out {  su myuser myusergroup  missingok  notifempty  copytruncate  daily  size 5M  rotate 7 } Here /opt/app/tomcat/logs/catalina.out is path to your log file. press Esc key, then : wq!  to write and quite ...