Logging (Buster)
Jump to navigation
Jump to search
Logrotate
You'll want to edit or add specific entries in /etc/logrotate.d/ as needed. For nginx and php-fpm I like to have much longer logs (rotate weekly, 26 weeks, delaycompress).
/etc/logrote.conf
# see "man logrotate" for details # rotate log files weekly weekly
# keep 4 weeks worth of backlogs rotate 26
# create new (empty) log files after rotating old ones create
# use date as a suffix of the rotated file #dateext
# uncomment this if you want your log files compressed compress delaycompress
# packages drop log rotation information into this directory include /etc/logrotate.d