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 <% if kernel == 'Linux' %>
87 # standard Linux log source (this is the default place for the syslog()
88 # function to send logs to)
89 unix-stream("/dev/log");
90 # messages from the kernel
91 file("/proc/kmsg" log_prefix("kernel: "));
93 # standard Linux log source (this is the default place for the syslog()
94 # function to send logs to)
95 unix-dgram("/var/run/log");
96 # messages from the kernel
97 file("/dev/klog" log_prefix("kernel: "));
99 # use the following line if you want to receive remote UDP logging messages
100 # (this is equivalent to the "-r" syslogd flag)
108 # some standard log files
109 destination df_auth { file("/var/log/auth.log"); };
110 destination df_syslog { file("/var/log/syslog"); };
111 destination df_cron { file("/var/log/cron.log"); };
112 destination df_daemon { file("/var/log/daemon.log"); };
113 destination df_kern { file("/var/log/kern.log"); };
114 destination df_lpr { file("/var/log/lpr.log"); };
115 destination df_mail { file("/var/log/mail.log" group(maillog)); };
116 destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
117 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
118 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
119 destination df_user { file("/var/log/user.log" perm(0644)); };
120 destination df_uucp { file("/var/log/uucp.log"); };
122 # these files are meant for the mail system log files
123 # and provide re-usable destinations for {mail,cron,...}.info,
124 # {mail,cron,...}.notice, etc.
125 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
126 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
127 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
128 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
129 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
131 # these files are meant for the news system, and are kept separated
132 # because they should be owned by "news" instead of "root"
133 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
134 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
135 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
137 # some more classical and useful files found in standard syslog configurations
138 destination df_debug { file("/var/log/debug"); };
139 destination df_messages { file("/var/log/messages"); };
141 <% if kernel == 'Linux' %>
143 # a console to view log messages under X
144 destination dp_xconsole { pipe("/dev/xconsole"); };
148 # this will send messages to everyone logged in
149 destination du_all { usertty("*"); };
155 # all messages from the auth and authpriv facilities
156 filter f_auth { facility(auth, authpriv); };
158 # all messages except from the auth and authpriv facilities
159 filter f_syslog { not facility(auth, authpriv); };
161 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
162 # and uucp facilities
163 filter f_cron { facility(cron); };
164 filter f_daemon { facility(daemon); };
165 filter f_kern { facility(kern); };
166 filter f_lpr { facility(lpr); };
167 filter f_mail { facility(mail); };
168 filter f_news { facility(news); };
169 filter f_user { facility(user); };
170 filter f_uucp { facility(uucp); };
172 # some filters to select messages of priority greater or equal to info, warn,
174 # (equivalents of syslogd's *.info, *.warn, and *.err)
175 filter f_at_least_info { level(info..emerg); };
176 filter f_at_least_notice { level(notice..emerg); };
177 filter f_at_least_warn { level(warn..emerg); };
178 filter f_at_least_err { level(err..emerg); };
179 filter f_at_least_crit { level(crit..emerg); };
181 # all messages of priority debug not coming from the auth, authpriv, news, and
183 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
185 # all messages of info, notice, or warn priority not coming form the auth,
186 # authpriv, cron, daemon, mail, and news facilities
188 level(info,notice,warn)
189 and not facility(auth,authpriv,cron,daemon,mail,news);
192 # messages with priority emerg
193 filter f_emerg { level(emerg); };
195 <% if kernel == 'Linux' %>
196 # complex filter for messages usually sent to the xconsole
198 facility(daemon,mail)
199 or level(debug,info,notice,warn)
201 and level(crit,err,notice));
207 # order matters if you use "flags(final);" to mark the end of processing in a
210 # these rules provide the same behavior as the commented original syslogd rules
212 # auth,authpriv.* /var/log/auth.log
216 destination(df_auth);
219 # *.*;auth,authpriv.none -/var/log/syslog
223 destination(df_syslog);
226 # this is commented out in the default syslog.conf
227 # cron.* /var/log/cron.log
231 # destination(df_cron);
234 # daemon.* -/var/log/daemon.log
238 destination(df_daemon);
241 # kern.* -/var/log/kern.log
245 destination(df_kern);
248 # lpr.* -/var/log/lpr.log
255 # mail.* -/var/log/mail.log
259 destination(df_mail);
262 # user.* -/var/log/user.log
266 destination(df_user);
269 # uucp.* /var/log/uucp.log
273 destination(df_uucp);
276 # mail.info -/var/log/mail.info
280 filter(f_at_least_info);
281 destination(df_mail_info);
284 # mail.warn -/var/log/mail.warn
288 filter(f_at_least_warn);
289 destination(df_mail_warn);
292 # mail.err /var/log/mail.err
296 filter(f_at_least_err);
297 destination(df_mail_err);
300 # news.crit /var/log/news/news.crit
304 filter(f_at_least_crit);
305 destination(df_news_dot_crit);
308 # news.err /var/log/news/news.err
312 filter(f_at_least_err);
313 destination(df_news_dot_err);
316 # news.notice /var/log/news/news.notice
320 filter(f_at_least_notice);
321 destination(df_news_dot_notice);
326 # auth,authpriv.none;\
327 # news.none;mail.none -/var/log/debug
331 destination(df_debug);
335 # *.=info;*.=notice;*.=warn;\
336 # auth,authpriv.none;\
338 # mail,news.none -/var/log/messages
342 destination(df_messages);
353 <% if kernel == 'Linux' %>
355 # news.crit;news.err;news.notice;\
357 # *.=notice;*.=warn |/dev/xconsole
361 destination(dp_xconsole);