rsyslog: Only do local logging for local messages.
[matthijs/servers/tika.git] / etc / rsyslog.conf
1 #  /etc/rsyslog.conf    Configuration file for rsyslog.
2 #
3 #                       For more information see
4 #                       /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
5
6
7 #################
8 #### MODULES ####
9 #################
10
11 $ModLoad imuxsock # provides support for local system logging
12 $ModLoad immark   # provides --MARK-- message capability
13 $MarkMessagePeriod  900 # mark messages appear every 15 Minutes
14
15 ###########################
16 #### GLOBAL DIRECTIVES ####
17 ###########################
18
19 #
20 # Use traditional timestamp format.
21 # To enable high precision timestamps, comment out the following line.
22 #
23 $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
24
25 #
26 # Set the default permissions for all log files.
27 #
28 $FileOwner root
29 $FileGroup adm
30 $FileCreateMode 0640
31 $DirCreateMode 0755
32 $Umask 0022
33
34 #
35 # Include all config files in /etc/rsyslog.d/
36 #
37 $IncludeConfig /etc/rsyslog.d/*.conf
38
39 # Store any queues here. This directory is not created automatically, so it
40 # must already exist!
41 $WorkDirectory /var/spool/rsyslog
42
43 # Use a (disk-assisted) main queue
44 # Use a linked list for queueing
45 $MainMsgQueueType LinkedList
46 # Name to use for the queue file
47 $MainMsgQueueFileName main
48 # save in-memory data if rsyslog shuts down
49 $MainMsgQueueSaveOnShutdown on
50
51 #######################
52 #### Local logging ####
53 #######################
54
55 # Discard all log entries not locally generated (note that the ~ here is the
56 # "discard" action, preventing the rules below from bein ran on these messages.
57 if $fromhost-ip != '127.0.0.1' then ~
58
59
60 # Log each facility into its own log
61 auth,authpriv.*                 /var/log/rsyslog/auth.log
62 cron.*                          -/var/log/rsyslog/user.log
63 daemon.*                        -/var/log/rsyslog/daemon.log
64 kern.*                          -/var/log/rsyslog/kern.log
65 lpr.*                           -/var/log/rsyslog/lpr.log
66 mail.*                          -/var/log/rsyslog/mail.log
67 user.*                          -/var/log/rsyslog/user.log
68 local0,local1,local2,\
69         local3,local4,local5,\
70         local6,local7.*         -/var/log/rsyslog/local.log
71
72 # Omitted facilities: syslog, news, uucp, ftp
73
74 # All logs end up in syslog as weel as the corresponding facility log above
75 # (except for auth, mail which only end up in the facility log for privacy
76 # reasons and debug which only ends up in the debug log below to prevent
77 # flooding).
78 *.*;\
79         *.!=debug;\
80         auth,authpriv.none;\
81         mail.none               -/var/log/rsyslog/syslog
82
83 # Debug entries end up in debug.log as well as the corresponding facility log
84 # above (except for auth and mail, which only end up in the facility logs for
85 # privacy reasons).
86 *.=debug;\
87         auth,authpriv.none;\
88         news.none;mail.none     -/var/log/rsyslog/debug.log
89 #
90 # Emergencies are sent to everybody logged in.
91 #
92 *.emerg                         *