From 1934e799003109a330c8a3d05dd6794d4edc485a Mon Sep 17 00:00:00 2001 From: Chiradeep Vittal Date: Wed, 12 Jan 2011 11:17:06 -0800 Subject: [PATCH] bug 7141: rotate logs --- .../systemvm/debian/config/etc/logrotate.conf | 23 ++++++++----- .../systemvm/debian/config/etc/rsyslog.conf | 34 +++++++------------ 2 files changed, 26 insertions(+), 31 deletions(-) diff --git a/patches/systemvm/debian/config/etc/logrotate.conf b/patches/systemvm/debian/config/etc/logrotate.conf index 4bd60ab4e4e..f5a660964d3 100644 --- a/patches/systemvm/debian/config/etc/logrotate.conf +++ b/patches/systemvm/debian/config/etc/logrotate.conf @@ -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. diff --git a/patches/systemvm/debian/config/etc/rsyslog.conf b/patches/systemvm/debian/config/etc/rsyslog.conf index 2a7f9f9867d..8dc7c7504ca 100644 --- a/patches/systemvm/debian/config/etc/rsyslog.conf +++ b/patches/systemvm/debian/config/etc/rsyslog.conf @@ -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