The 11.1 release brought a very desirable feature to syslogd: $ man syslog.conf : A special include keyword can be used to include all files with names ending in '.conf' and not beginning with a '.' contained in the directory following the keyword. but ... It turns out that of all the *.conf files found in the included directory /etc/syslog.d, only entries found in the (alphabetically) *last* file there are taken into account, all other entries in remaining included files are just ignored. What is interesting is that all log files listed in all included conf files are indeed created at the syslogd start time, it's just that they never receive any log messages. Running syslogd with a -d (debug) option confirms this: all included files are indeed read, but the reported matrix only reflects log entries from the main syslog.conf file and from the last of the included files: $ cat /etc/syslog.conf include /etc/syslog.d $ ls -l /etc/syslog.d -rw-r--r-- 1 root wheel 28 Aug 23 17:15 aaa.conf -rw-r--r-- 1 root wheel 32 Aug 23 17:15 ddd.conf -rw-r--r-- 1 root wheel 28 Aug 23 17:15 mmm.conf $ cat /etc/syslog.d/aaa.conf auth.info /var/log/auth.log $ cat /etc/syslog.d/ddd.conf daemon.info /var/log/daemon.log $ cat /etc/syslog.d/mmm.conf mail.info /var/log/mail.log # syslogd -d -F socksetup: new socket fd is 6 socksetup: new socket fd is 7 listening on inet and/or inet6 socket sending on inet and/or inet6 socket off & running.... init loading timezone data via tzset() Trying to include files in '/etc/syslog.d' reading /etc/syslog.d/aaa.conf cfline("auth.info /var/log/auth.log", f, "*", "*") reading /etc/syslog.d/ddd.conf cfline("daemon.info /var/log/daemon.log", f, "*", "*") reading /etc/syslog.d/mmm.conf cfline("mail.info /var/log/mail.log", f, "*", "*") X X 6 X X X X X X X X X X X X X X X X X X X X X X FILE: /var/log/mail.log logmsg: pri 56, flags 4, from sleepy, msg syslogd: restart syslogd: restarted logmsg: pri 6, flags 4, from sleepy, msg syslogd: kernel boot file is /boot/kernel/kernel syslogd: kernel boot file is /boot/kernel/kernel
sobomax@, was it you that was working on the upgraded functionality? I have lost track, sorry.
releng/11.1 SVN log shows the following: ------------------------------------------------------------------------ r308721 | bapt | 2016-11-16 08:04:49 +0100 (Wed, 16 Nov 2016) | 20 lines MFC r308160: syslogd(8): add an 'include' keyword All the '.conf' files not beginning with a '.' contained int he directory following the keyword will be included. This keyword can only be used in the first level configuration files. Modify the default syslogd.conf to 'include' /etc/syslog.d and /usr/local/etc/syslog.d It simplify a lot handling of syslog from automation tools. Reviewed by: markj, kib (via irc) Approved by: markj MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D8402
The issue is already reported in bug #220884 and patch is submitted to it. So this PR should be closed with the reason of DUPLICATE.
*** This bug has been marked as a duplicate of bug 220884 ***