Difference between revisions of "Logging (Buster)"

From Hexwiki
Jump to navigation Jump to search
(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...")
 
Line 25: Line 25:
 
  # packages drop log rotation information into this directory
 
  # packages drop log rotation information into this directory
 
  include /etc/logrotate.d
 
  include /etc/logrotate.d
 +
 +
{{Bottom Buster}}

Revision as of 03:37, 24 January 2021

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