Recently I was confrontated with a strange problem. Logrotate did not rotate logfiles. When I started it in debug-mode I got the following message:
empty log files are not rotated, old logs are removed considering log /var/log/syslog log does not need rotating not running postrotate script, since no logs were rotated
The problem was that some logfiles had a zero size so logrotate did not rotate them. It was quite easy to solve the problem by deleting the files:
find /var/log/ -size 0 -exec rm {} \;
BTW: while I was searching the problem I did not read the manual properly: logrotate -d does not rotate the files! It just prints out debug-messages.
-d, –debug
Turns on debug mode and implies -v. In debug mode, no changes will be made to the
logs or to the logrotate state file.