GNU bug report logs - #30498
[PATCH shepherd] shepherd: If /dev/kmsg is writable, use it for logging.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Sat, 17 Feb 2018 12:21:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 30498 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#30498] [PATCH 0/3] Log to syslog whenever possible
Date: Wed,  7 Mar 2018 12:04:51 +0100
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





This bug report was last modified 7 years and 126 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.