From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etWtZ-0001Cp-Ff for guix-patches@gnu.org; Wed, 07 Mar 2018 06:06:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etWtY-0000gn-Jm for guix-patches@gnu.org; Wed, 07 Mar 2018 06:06:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:40581) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etWtY-0000ge-Gl for guix-patches@gnu.org; Wed, 07 Mar 2018 06:06:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1etWtW-0004VQ-Ix for guix-patches@gnu.org; Wed, 07 Mar 2018 06:06:02 -0500 Subject: [bug#30498] [PATCH 0/3] Log to syslog whenever possible Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 7 Mar 2018 12:04:51 +0100 Message-Id: <20180307110454.17110-1-ludo@gnu.org> In-Reply-To: <87371ea2jj.fsf@gnu.org> References: <87371ea2jj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30498@debbugs.gnu.org Hello! These patches allow shepherd to use syslog, when /dev/log is reachable, and to fall back to /dev/kmsg otherwise. That leads to unified logging, which is nice. By looking at /var/log/messages one can see the sequence of events, which is often more convenient than having to look at separate log files. And we can filter things via syslogd’s config. However! The downside is that messages upon shutdown written after syslogd has been killed are lost: they go to /dev/kmsg, which goes to the console at that point, but they’re not written anywhere. Until now, everything until the root file system is unmounted (see ‘stop-logging’ call in (gnu services base)) would be written to /var/log/shepherd.log, which is useful to debug shutdown (that’s how I discovered the issue fixed by Guix commit 6c4458172d12dbda969c2eae5b3b6be19a068780, for instance.) So, I don’t know. Can we do better? Should we switch to /var/log/shepherd.log when syslogd disappears? Ideas? That’s a situation where having syslogd inside PID 1 helps… Ludo’. Ludovic Courtès (3): Turn 'log-output-port' into a parameter. Simplify 'make-shepherd-output-port'. Use syslog for logging when running as root. doc/shepherd.texi | 18 +++- modules/shepherd.scm | 209 +++++++++++++++++++++++-------------------- modules/shepherd/comm.scm | 119 ++++++++++++++++++------ modules/shepherd/support.scm | 19 ++-- 4 files changed, 224 insertions(+), 141 deletions(-) -- 2.16.2