rsyslog: Move all rsyslog log files into a subdir.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 5 May 2009 08:17:52 +0000 (10:17 +0200)
committerroot <root@template.drsnuggles.stderr.nl>
Tue, 5 May 2009 09:36:04 +0000 (11:36 +0200)
This allows us to use *.log in the logrotate configuration, without
conflicting with logfiles not created by rsyslog.

etc/logrotate.d/rsyslog
etc/rsyslog.conf

index eac2616b9197d649b0435266a80784aa42942318..568250836065a0564e4f219de3ebc5407660aa93 100644 (file)
@@ -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
index 5ad1ede7ce0f4a0056afdf80b1e221be77d1c46a..262d102b15b8107721e93a50d4a909dca31b95a1 100644 (file)
@@ -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.
 #