2 # Configuration file for syslog-ng under Debian
4 # attempts at reproducing default syslog behavior
6 # the standard syslog levels are (in descending order of priority):
7 # emerg alert crit err warning notice info debug
8 # the aliases "error", "panic", and "warn" are deprecated
9 # the "none" priority found in the original syslogd configuration is
10 # only used in internal messages created by syslogd
17 # disable the chained hostname format in logs
18 # (default is enabled)
21 # the time to wait before a died connection is re-established
25 # the time to wait before an idle destination file is closed
29 # the number of lines buffered before written to file
30 # you might want to increase this if your disk isn't catching with
31 # all the log messages you get or if you want less disk activity
36 # the number of lines fitting in the output queue
39 # enable or disable directory creation for destination files
42 # default owner, group, and permissions for log files
43 # (defaults are 0, 0, 0600)
48 # default owner, group, and permissions for created directories
49 # (defaults are 0, 0, 0700)
54 # enable or disable DNS usage
55 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
56 # a Denial of Service attack
60 # maximum length of message in bytes
61 # this is only limited by the program listening on the /dev/log Unix
62 # socket, glibc can handle arbitrary length log messages, but -- for
63 # example -- syslogd accepts only 1024 bytes
67 #Disable statistic log messages.
70 # Some program send log messages through a private implementation.
71 # and sometimes that implementation is bad. If this happen syslog-ng
72 # may recognise the program name as hostname. Whit this option
73 # we tell the syslog-ng that if a hostname match this regexp than that
74 # is not a real hostname.
75 bad_hostname("^gconfd$");
82 # all known message sources
84 # message generated by Syslog-NG
86 # standard Linux log source (this is the default place for the syslog()
87 # function to send logs to)
88 unix-stream("/dev/log");
89 # messages from the kernel
90 file("/proc/kmsg" log_prefix("kernel: "));
91 # use the following line if you want to receive remote UDP logging messages
92 # (this is equivalent to the "-r" syslogd flag)
100 # some standard log files
101 destination df_auth { file("/var/log/auth.log"); };
102 destination df_syslog { file("/var/log/syslog"); };
103 destination df_cron { file("/var/log/cron.log"); };
104 destination df_daemon { file("/var/log/daemon.log"); };
105 destination df_kern { file("/var/log/kern.log"); };
106 destination df_lpr { file("/var/log/lpr.log"); };
107 destination df_mail { file("/var/log/mail.log" group(maillog)); };
108 destination df_user { file("/var/log/user.log" perm(0644)); };
109 destination df_uucp { file("/var/log/uucp.log"); };
111 # these files are meant for the mail system log files
112 # and provide re-usable destinations for {mail,cron,...}.info,
113 # {mail,cron,...}.notice, etc.
114 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
115 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
116 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
117 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
118 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
120 # these files are meant for the news system, and are kept separated
121 # because they should be owned by "news" instead of "root"
122 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
123 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
124 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
126 # some more classical and useful files found in standard syslog configurations
127 destination df_debug { file("/var/log/debug"); };
128 destination df_messages { file("/var/log/messages"); };
131 # a console to view log messages under X
132 destination dp_xconsole { pipe("/dev/xconsole"); };
135 # this will send messages to everyone logged in
136 destination du_all { usertty("*"); };
142 # all messages from the auth and authpriv facilities
143 filter f_auth { facility(auth, authpriv); };
145 # all messages except from the auth and authpriv facilities
146 filter f_syslog { not facility(auth, authpriv); };
148 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
149 # and uucp facilities
150 filter f_cron { facility(cron); };
151 filter f_daemon { facility(daemon); };
152 filter f_kern { facility(kern); };
153 filter f_lpr { facility(lpr); };
154 filter f_mail { facility(mail); };
155 filter f_news { facility(news); };
156 filter f_user { facility(user); };
157 filter f_uucp { facility(uucp); };
159 # some filters to select messages of priority greater or equal to info, warn,
161 # (equivalents of syslogd's *.info, *.warn, and *.err)
162 filter f_at_least_info { level(info..emerg); };
163 filter f_at_least_notice { level(notice..emerg); };
164 filter f_at_least_warn { level(warn..emerg); };
165 filter f_at_least_err { level(err..emerg); };
166 filter f_at_least_crit { level(crit..emerg); };
168 # all messages of priority debug not coming from the auth, authpriv, news, and
170 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
172 # all messages of info, notice, or warn priority not coming form the auth,
173 # authpriv, cron, daemon, mail, and news facilities
175 level(info,notice,warn)
176 and not facility(auth,authpriv,cron,daemon,mail,news);
179 # messages with priority emerg
180 filter f_emerg { level(emerg); };
182 # complex filter for messages usually sent to the xconsole
184 facility(daemon,mail)
185 or level(debug,info,notice,warn)
187 and level(crit,err,notice));
193 # order matters if you use "flags(final);" to mark the end of processing in a
196 # these rules provide the same behavior as the commented original syslogd rules
198 # auth,authpriv.* /var/log/auth.log
202 destination(df_auth);
205 # *.*;auth,authpriv.none -/var/log/syslog
209 destination(df_syslog);
212 # this is commented out in the default syslog.conf
213 # cron.* /var/log/cron.log
217 # destination(df_cron);
220 # daemon.* -/var/log/daemon.log
224 destination(df_daemon);
227 # kern.* -/var/log/kern.log
231 destination(df_kern);
234 # lpr.* -/var/log/lpr.log
241 # mail.* -/var/log/mail.log
245 destination(df_mail);
248 # user.* -/var/log/user.log
252 destination(df_user);
255 # uucp.* /var/log/uucp.log
259 destination(df_uucp);
262 # mail.info -/var/log/mail.info
266 filter(f_at_least_info);
267 destination(df_facility_dot_info);
270 # mail.warn -/var/log/mail.warn
274 filter(f_at_least_warn);
275 destination(df_facility_dot_warn);
278 # mail.err /var/log/mail.err
282 filter(f_at_least_err);
283 destination(df_facility_dot_err);
286 # news.crit /var/log/news/news.crit
290 filter(f_at_least_crit);
291 destination(df_news_dot_crit);
294 # news.err /var/log/news/news.err
298 filter(f_at_least_err);
299 destination(df_news_dot_err);
302 # news.notice /var/log/news/news.notice
306 filter(f_at_least_notice);
307 destination(df_news_dot_notice);
312 # auth,authpriv.none;\
313 # news.none;mail.none -/var/log/debug
317 destination(df_debug);
321 # *.=info;*.=notice;*.=warn;\
322 # auth,authpriv.none;\
324 # mail,news.none -/var/log/messages
328 destination(df_messages);
340 # news.crit;news.err;news.notice;\
342 # *.=notice;*.=warn |/dev/xconsole
346 destination(dp_xconsole);