How can I get logrotate dateext to reflect the log date rather than the rotation date?
- by Adam
My Apache logrotate config looks like this:
/var/log/http/*log {
monthly
dateext
dateformat .%Y.%m
[... rest stripped for brevity ...]
}
This works great, except that the date on the rotated filename is one period later than the period actually covered by the logs, for example error_log.2012.09 covers 2012-08-01 to 2012-08-31.
I…