Logging (Buster)

From Hexwiki
Revision as of 03:17, 24 January 2021 by Vekseid (talk | contribs) (Created page with " == 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, d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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