From owner-freebsd-bugs@freebsd.org Wed Aug 23 15:23:54 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB44EDE989D for ; Wed, 23 Aug 2017 15:23:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFFC174721 for ; Wed, 23 Aug 2017 15:23:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v7NFNsLf006554 for ; Wed, 23 Aug 2017 15:23:54 GMT (envelope-from bugzilla-noreply@freebsd.org) 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 Date: Wed, 23 Aug 2017 15:23:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: Mark.Martinec@ijs.si X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2017 15:23:55 -0000 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.=