From: Matthijs Kooijman Date: Tue, 5 May 2009 08:17:52 +0000 (+0200) Subject: rsyslog: Move all rsyslog log files into a subdir. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=4086aa8757f0312102eace7ebc628d8435c48546;p=matthijs%2Fservers%2Fdrsnuggles.git rsyslog: Move all rsyslog log files into a subdir. This allows us to use *.log in the logrotate configuration, without conflicting with logfiles not created by rsyslog. --- diff --git a/etc/logrotate.d/rsyslog b/etc/logrotate.d/rsyslog index eac2616..5682508 100644 --- a/etc/logrotate.d/rsyslog +++ b/etc/logrotate.d/rsyslog @@ -1,4 +1,4 @@ -/var/log/syslog +/var/log/rsyslog/syslog { rotate 7 daily @@ -11,7 +11,7 @@ endscript } -/var/log/*.log +/var/log/rsyslog/*.log { rotate 4 weekly diff --git a/etc/rsyslog.conf b/etc/rsyslog.conf index 5ad1ede..262d102 100644 --- a/etc/rsyslog.conf +++ b/etc/rsyslog.conf @@ -42,16 +42,16 @@ $IncludeConfig /etc/rsyslog.d/*.conf # # Log each facility into its own log -auth,authpriv.* /var/log/auth.log -cron.* -/var/log/user.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 +auth,authpriv.* /var/log/rsyslog/auth.log +cron.* -/var/log/rsyslog/user.log +daemon.* -/var/log/rsyslog/daemon.log +kern.* -/var/log/rsyslog/kern.log +lpr.* -/var/log/rsyslog/lpr.log +mail.* -/var/log/rsyslog/mail.log +user.* -/var/log/rsyslog/user.log local0,local1,local2,\ local3,local4,local5,\ - local6,local7.* -/var/log/local.log + local6,local7.* -/var/log/rsyslog/local.log # Omitted facilities: syslog, news, uucp, ftp @@ -62,14 +62,14 @@ local0,local1,local2,\ *.*;\ *.!=debug;\ auth,authpriv.none;\ - mail.none -/var/log/syslog + mail.none -/var/log/rsyslog/syslog # Debug entries end up in debug.log as well as the corresponding facility log # above (except for auth and mail, which only end up in the facility logs for # privacy reasons). *.=debug;\ auth,authpriv.none;\ - news.none;mail.none -/var/log/debug.log + news.none;mail.none -/var/log/rsyslog/debug.log # # Emergencies are sent to everybody logged in. #