Where does logrotate save its own log?
Solution 1:
logrotate
does not log anything by default. normally it should be in your cron somewhere, for instance:
$ grep -r -- 'logrotate.conf' /etc/cron*
/etc/cron.daily/logrotate:/usr/sbin/logrotate /etc/logrotate.conf
You can either run that manually to see what is wrong, or redirect the logrotate output to a file in the above cron to see what happened next day.
Likely somewhere the config is incorrect and caused the logrotate run to break.
Solution 2:
The only thing that logrotate records normally is in cat /var/lib/logrotate/status
.
This is taken from https://serverfault.com/a/518134/266525
Solution 3:
Another good place to look is /var/log/messages
on CentOS for errors such as this from the cron.daily /etc/cron.daily/logrotate
logrotate: ALERT exited abnormally with [1]
You can also run in debug mode manually and check for errors:
/usr/sbin/logrotate -d /etc/logrotate.conf
Source: https://access.redhat.com/solutions/32831
Solution 4:
If you're running logrotate
from cron and not redirecting the output, the output, if there is any, will go to email for whichever ID is running the cron job. I redirect my output to a log file.
For example:
25 3 * * 7 /usr/sbin/logrotate -s /home/user/conf/mwarelogrotate.state
/home/user/conf/mwarelogrotate.conf >> /home/user/logs/logrotate.log 2>&1