Skip to content

Persist logrotate state file in /log

Marko Zagožen requested to merge persist-logrotate-state into master

Logrotate uses the state file to record rotate operations on the logfiles. For daily rotations it will only rotate the file if the current date > date in the status file. We run logrotate from cron.daily and that means that on the "first" run it just creates the state file. If the container is recreated before the second run, like a nightly deploy of the new image, it may happen that the log files are never rotated. It makes sense to store the logrotate state in the same persistent location as the logs.

Merge request reports