To verify if a particular log is indeed rotating or not and to check the last date and time of its rotation, check the /var/lib/logrotate/status file. This is a neatly formatted file that contains the log file name and the date on which it was last rotated.
You can try running logrotate in debug or verbose mode:
-d Turns on debug mode and implies -v. In debug mode, no changes
will be made to the logs or to the logrotate state file.
-v, --verbose
Display messages during rotation.
Various logs are rotated on various frequencies based on the configuration file (/etc/logrotate.conf) and/or directory (/etc/logrotate.d). Names may vary on different distributions. The configuration may specify pre and/or post rotation actions. Names of rotated files and last rotation date are in the state file (/var/lib/logrotate/state).
Logrotate does not have logging facilities. Reload/restart actions it initiates will be logged according to the logging for the program being acted on.
The easiest way to do that would be to edit /etc/cron.daily/logrotate to include the -v option. Detail about logrotate configuration and options can be found with the command man logrotate.
Taken From:
https://www.digitalocean.com/community/articles/how-to-manage-log-files-with-logrotate-on-ubuntu-12-10
You can try running logrotate in debug or verbose mode:
In Suse Linux distros is like this:
You can check the settings of
logrotate
, usually in/etc/logrotate.conf
.Modern distros have a specific
logrotate
configuration file in the/etc/logrotate.d
directory.e.g. for
nginx
It will keep the file for 52 weeks (a year). The rotation is weekly.
Various logs are rotated on various frequencies based on the configuration file (/etc/logrotate.conf) and/or directory (/etc/logrotate.d). Names may vary on different distributions. The configuration may specify pre and/or post rotation actions. Names of rotated files and last rotation date are in the state file (/var/lib/logrotate/state).
Logrotate does not have logging facilities. Reload/restart actions it initiates will be logged according to the logging for the program being acted on.
The easiest way to do that would be to edit
/etc/cron.daily/logrotate
to include the-v
option. Detail about logrotate configuration and options can be found with the commandman logrotate
.