# logrotate for the directory the manager writes to. # # Install as /etc/logrotate.d/wp-cli-update (root:root 0644). The manager rotates its # own logs by size (LOG_MAX_BYTES/LOG_KEEP); this file is for the long-term history # and for the cron wrappers' output. # # copytruncate is deliberate: the manager keeps the log file open for the duration of # a run, and a rename would leave it writing into an unlinked inode for hours. /var/log/wp-cli-update/*.log /var/log/wp-cli-update/cron.out { weekly rotate 12 missingok notifempty compress delaycompress copytruncate create 0640 root adm su root adm } # JSON reports are one document per run. Keep a quarter's worth, compressed. /var/log/wp-cli-update/*.json { weekly rotate 13 missingok notifempty compress delaycompress copytruncate create 0640 root adm su root adm }