3c5973d300
The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size. Normally, logrotate runs as a daily cron job.
22 lines
433 B
Text
22 lines
433 B
Text
# see "man logrotate" for details
|
|
# rotate log files weekly
|
|
weekly
|
|
|
|
# keep 4 weeks worth of backlogs
|
|
rotate 4
|
|
|
|
# create new (empty) log files after rotating old ones
|
|
create
|
|
|
|
# uncomment this if you want your log files compressed
|
|
compress
|
|
|
|
# RPM packages drop log rotation information into this directory
|
|
include __PREFIX__/etc/logrotate.d
|
|
|
|
/var/log/lastlog {
|
|
monthly
|
|
rotate 1
|
|
}
|
|
|
|
# system-specific logs may be configured here
|