unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 30498@debbugs.gnu.org
Subject: [bug#30498] [PATCH 0/3] Log to syslog whenever possible
Date: Wed,  7 Mar 2018 12:04:51 +0100	[thread overview]
Message-ID: <20180307110454.17110-1-ludo@gnu.org> (raw)
In-Reply-To: <87371ea2jj.fsf@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

  parent reply	other threads:[~2018-03-07 11:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-17 12:20 [bug#30498] [PATCH shepherd] shepherd: If /dev/kmsg is writable, use it for logging Danny Milosavljevic
2018-02-17 12:25 ` Danny Milosavljevic
2018-02-17 16:48 ` [bug#30498] [WIP v2 " Danny Milosavljevic
2018-02-17 16:49   ` Danny Milosavljevic
2018-02-26 18:04   ` Ludovic Courtès
2018-02-26 21:51     ` Danny Milosavljevic
2018-02-27  9:22       ` Ludovic Courtès
2018-02-26 22:32     ` Danny Milosavljevic
2018-02-27  9:19       ` Ludovic Courtès
2018-03-03 21:54         ` Ludovic Courtès
2018-03-03 22:37           ` Danny Milosavljevic
2018-03-05 16:51             ` Ludovic Courtès
2018-03-06  8:09               ` Danny Milosavljevic
2018-03-07 12:46                 ` Ludovic Courtès
2018-03-07 11:04               ` Ludovic Courtès [this message]
2018-03-07 11:04                 ` [bug#30498] [PATCH 1/3] Turn 'log-output-port' into a parameter Ludovic Courtès
2018-03-07 11:04                 ` [bug#30498] [PATCH 2/3] Simplify 'make-shepherd-output-port' Ludovic Courtès
2018-03-07 11:04                 ` [bug#30498] [PATCH 3/3] Use syslog for logging when running as root Ludovic Courtès
2018-03-07 15:25                 ` [bug#30498] [PATCH 0/3] Log to syslog whenever possible Ludovic Courtès
2018-03-15 17:00                 ` bug#30498: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180307110454.17110-1-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=30498@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).