in Debian, Linux

Debugging logrotate issues

If your log files aren’t automatically rotated by the logrotate program there are probably some errors in the config files located in /etc/logrotate.d.

To find out where the error is, run this command:

logrotate -d -f /etc/logrotate.conf

You will see some debug messages on the console and hopefully a error that will lead you to the faulty lines in the config. In my case there were duplicate entries for /var/log/mail.log shown in the debug like this:

error: rsyslog:13 duplicate log entry for /var/log/mail.log