On 2016/12/08 09:42, Landry Breuil wrote:
> Hi,
>
> i know this is in the examples section of syslog.conf(5), but i got
> bitten by this again, so what do ppl thing about adding those 3 lines to
> the default syslog.conf ?
>
> wont push for this, was just taunted by someone "i would OK a diff to
> add an example to the default syslog.conf" :)
>
> Landry
>
> Index: etc/syslog.conf
> ===================================================================
> RCS file: /cvs/src/etc/syslog.conf,v
> retrieving revision 1.19
> diff -u -r1.19 syslog.conf
> --- etc/syslog.conf 26 Nov 2015 15:25:14 -0000 1.19
> +++ etc/syslog.conf 8 Dec 2016 08:39:21 -0000
> @@ -1,6 +1,13 @@
> # $OpenBSD: syslog.conf,v 1.19 2015/11/26 15:25:14 deraadt Exp $
> #
>
> +# Uncomment these three lines to log messages from spamd(8) to its own
> +# logfile, without being also logged in /var/log/daemon.
> +# Note that the logfile has to be created beforehands.
> +#!!spamd
> +#daemon.info /var/log/spamd
> +#!*
> +
> *.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none
> /var/log/messages
> kern.debug;syslog,user.info /var/log/messages
> auth.info /var/log/authlog
>
I'm not sure if we need to tell people to create the file; at least
we don't tell them to create files for other commented-out examples
(uucp, doas).
Slight tweaks to the english, plus I tweaked the doas example to
try and make the difference clear between it and the first example
("instead of" vs "as well as").
Index: syslog.conf
===================================================================
RCS file: /cvs/src/etc/syslog.conf,v
retrieving revision 1.19
diff -u -p -r1.19 syslog.conf
--- syslog.conf 26 Nov 2015 15:25:14 -0000 1.19
+++ syslog.conf 8 Dec 2016 13:13:35 -0000
@@ -1,6 +1,12 @@
# $OpenBSD: syslog.conf,v 1.19 2015/11/26 15:25:14 deraadt Exp $
#
+# Uncomment these three lines to log messages from spamd(8) to a
+# separate file instead of being logged in /var/log/daemon.
+#!!spamd
+#daemon.info /var/log/spamd
+#!*
+
*.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none
/var/log/messages
kern.debug;syslog,user.info /var/log/messages
auth.info /var/log/authlog
@@ -31,8 +37,8 @@ mail.info
/var/log/maillog
#*.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none @loghost
#auth,daemon,syslog,user.info;authpriv,kern.debug @loghost
-# Uncomment to log messages from doas(1) to its own log file. Matches are done
-# based on the program name.
+# Uncomment to log messages from doas(1) to its own log file as well
+# as the normal logs above. Matches are done based on the program name.
# Program-specific logs:
#!doas
#*.* /var/log/doas