# Rotate persistent logs.
# Assuming 256KiB (262144 bytes) sector size and 131MB (524 sectors) partition size.
# - Rotate only when at least one sector worth logs are written. (minsize=262144).
# - Month-old logs are only required. (maxage=30; rotate=monthly).
# - Ensure less than 10% of the partition is occupied by the logs.
#   total 5 logs of about 10 sectors each. (rotate=4, maxsize=2621440).
# - Do not keep date in the extension (nodateext) since logs could get rotated more than once
#   a day, (if size exceeds maxsize limit within a day) and since there is no option to have a
#   readable timestamp (HHMMSS format) in the extension.
# - Compress the logs (compress) to save space, but postpone compression of the previous log file
#   to the next rotation cycle (delaycompress) to avoid the chance of race with log write.
/data/persistent_logs/persistent.log {
    missingok
    compress
    delaycompress
    nodateext
    maxage 30
    maxsize 2621440
    minsize 262144
    rotate 4
    monthly
}
