bug 7141: rotate logs

This commit is contained in:
Chiradeep Vittal 2011-01-12 11:17:06 -08:00
parent 6ecbbe0b37
commit 1934e79900
2 changed files with 26 additions and 31 deletions

View File

@ -1,22 +1,27 @@
# see "man logrotate" for details
# rotate log files weekly
weekly
# rotate log files daily
daily
# keep 4 weeks worth of backlogs
rotate 4
# keep 5 days worth
rotate 5
# 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
# packages drop log rotation information into this directory
# max size 50M
size 50M
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp, or btmp -- we'll rotate them here
# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
@ -25,8 +30,8 @@ include /etc/logrotate.d
/var/log/btmp {
missingok
monthly
create 0660 root utmp
create 0600 root utmp
rotate 1
}
# system-specific logs may be configured here
# system-specific logs may be also be configured here.

View File

@ -13,8 +13,8 @@ $ModLoad imklog # provides kernel logging support (previously done by rklogd)
#$ModLoad immark # provides --MARK-- message capability
# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514
$ModLoad imudp
$UDPServerRun 3914
# provides TCP syslog reception
#$ModLoad imtcp
@ -54,13 +54,13 @@ $IncludeConfig /etc/rsyslog.d/*.conf
# First some standard log files. Log by facility.
#
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
#cron.* /var/log/cron.log
#*.*;auth,authpriv.none -/var/log/syslog
cron.* /var/log/cron.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
#user.* -/var/log/user.log
#
# Logging for the mail system. Split it up so that
@ -80,13 +80,14 @@ news.notice -/var/log/news/news.notice
#
# Some "catch-all" log files.
#
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
#*.=debug;\
# auth,authpriv.none;\
# news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
cron.none,daemon.none;\
local0.none,daemon.none;\
mail.none,news.none -/var/log/messages
#
# Emergencies are sent to everybody logged in.
@ -102,15 +103,4 @@ news.notice -/var/log/news/news.notice
# *.=debug;*.=info;\
# *.=notice;*.=warn /dev/tty8
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
# you must invoke `xconsole' with the `-file' option:
#
# $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
# busy site..
#
daemon.*;mail.*;\
news.err;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole
local0.* -/var/log/haproxy.log