I have my own application (myApp) that writes logs to the file '/ var / log / myApp'. I see how the logs are written and everything works fine. Now I'm trying to install logrotate for this file, and for this I created a configuration file '/etc/logrotate.d/myApp', the contents of which are
/var/log/myApp { missingok size +10k start 0 nocompress create 0600 root root rotate 10 postrotate /etc/init.d/rsyslog restart > /dev/null 2>&1 || true endscript }
Now, if I do a logrotate -dv /etc/logrotate.d/myApp , I do not see any errors as such, and when logrotate -f /etc/logrotate.d/myApp is executed, i.e. forced logrotate, the log rotates. But when the log file size exceeds 10k, the log will not be automatically rotated. Any help would be appreciated.
One
source share