Centos 6 LogRotate Debugging

Not sure if your log rotate patterns in /etc/logrotate.d/* are working as you’d expect, or want to know what a pattern is catching?

Then you want logs for your logs (ha). In this case you can troubleshoot by running the built in debug tool:

/usr/sbin/logrotate –debug /etc/logrotate.conf

Output this to a file for easier searching since you’ll likely only care about one or two patterns you’re changing:

/usr/sbin/logrotate –debug /etc/logrotate.conf > out.txt 2>&1

https://www.centos.org/forums/viewtopic.php?t=6249

http://stackoverflow.com/questions/6674327/redirect-all-output-to-file