Date: Wed, 23 Aug 2017 15:23:54 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 221742] syslogd include directive reads but disregards all but the last included .conf file Message-ID: <bug-221742-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221742 Bug ID: 221742 Summary: syslogd include directive reads but disregards all but the last included .conf file Product: Base System Version: 11.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: Mark.Martinec@ijs.si 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 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221742-8>