9d5adb993a
- Force log rotation at size thresholds only (no longer also rotating logs daily), allowing for more consistent archived log size - Eliminate remaining duplicate log messages - Cron facility now only logs to cron.log (was also logging to syslog) - Debug, mail, news and user log facilities only log to syslog; no longer creating separate log files for these facilities - Cron job that calls logrotate every minute now uses the main /etc/logrotate.conf file so as to check/rotate all logs every minute, not just the logs specified in the rsyslog file. Also redirecting output of this command to /dev/null to prevent "(CRON) info (No MTA installed, discarding output)" messages in cron.log due to lack of a mail service - Delete archive files based on remaining /var/log partition space. Note that this solution currently requires a minimum /var/log partition size of 32MB to function correctly - Update sonic-sairedis and sonic-swss submodules to incorporate recording file name changes - Add .screen file to .gitignore (unrelated)
33 lines
622 B
Plaintext
33 lines
622 B
Plaintext
# see "man logrotate" for details
|
|
# Rotate log files daily by default
|
|
daily
|
|
|
|
# Keep 4 days worth of backlogs by default
|
|
rotate 4
|
|
|
|
# create new (empty) log files after rotating old ones
|
|
create
|
|
|
|
# uncomment this if you want your log files compressed
|
|
#compress
|
|
|
|
# packages drop log rotation information into this directory
|
|
include /etc/logrotate.d
|
|
|
|
# no packages own wtmp, or btmp -- we'll rotate them here
|
|
/var/log/wtmp {
|
|
missingok
|
|
size 100k
|
|
create 0664 root utmp
|
|
rotate 1
|
|
}
|
|
|
|
/var/log/btmp {
|
|
missingok
|
|
size 100k
|
|
create 0660 root utmp
|
|
rotate 1
|
|
}
|
|
|
|
# system-specific logs may be configured here
|