From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqbTW-0000gT-11 for guix-patches@gnu.org; Tue, 27 Feb 2018 04:23:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqbTS-00059B-TD for guix-patches@gnu.org; Tue, 27 Feb 2018 04:23:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:54629) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eqbTS-000595-PC for guix-patches@gnu.org; Tue, 27 Feb 2018 04:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eqbTS-0000QS-J3 for guix-patches@gnu.org; Tue, 27 Feb 2018 04:23:02 -0500 Subject: [bug#30498] [WIP v2 shepherd] shepherd: If /dev/kmsg is writable, use it for logging. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180217122035.1443-1-dannym@scratchpost.org> <20180217164835.1178-1-dannym@scratchpost.org> <87muzvtyo3.fsf@gnu.org> <20180226225153.1d075735@scratchpost.org> Date: Tue, 27 Feb 2018 10:22:28 +0100 In-Reply-To: <20180226225153.1d075735@scratchpost.org> (Danny Milosavljevic's message of "Mon, 26 Feb 2018 22:51:53 +0100") Message-ID: <87efl66b3f.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Danny Milosavljevic Cc: 30498@debbugs.gnu.org Hi! Danny Milosavljevic skribis: > From 40426570679e83fff25eadbcc20476ebc321740f Mon Sep 17 00:00:00 2001 > From: Danny Milosavljevic > Date: Sat, 17 Feb 2018 17:44:34 +0100 > Subject: [PATCH v2] shepherd: If /dev/kmsg is writable, use it for loggin= g. > Tags: patch > > * modules/shepherd.scm (main): If /dev/kmsg is used, don't log to console > again - use only /dev/kmsg. Also redirect stderr to /dev/kmsg in > that case. > * modules/shepherd/comm.scm (%current-logfile-date-format): New variable. > (make-shepherd-output-port): Use it. Export. > * modules/shepherd/support.scm (default-logfile-date-format): New variabl= e. > (default-logfile): Use /dev/kmsg if writable. > (default-logfile-date-format): Drop duplicate timestamp. > * doc/shepherd.texi (logging): Document /dev/kmsg. ^ =E2=80=9CLogging=E2=80=9D. > --- a/doc/shepherd.texi > +++ b/doc/shepherd.texi > @@ -405,7 +405,8 @@ permissions are not as expected. > @cindex logging > @cindex log file > Log output into @var{file}, or if @var{file} is not given, > -@code{/var/log/shepherd.log} when running as superuser, > +@code{/dev/kmsg} when running as superuser (except when this is not poss= ible -- > +then it uses @code{/var/log/shepherd.log}), Nitpick: it should be three hyphens without surrounding spaces, leading to an em dash, =E2=80=9Clike---this=E2=80=9D. Let=E2=80=99s just make sure we have a solution for cryptsetup and then you= =E2=80=99re welcome to push it to shepherd.git! Thank you, Ludo=E2=80=99.