Message ID | 91683e6a6059df7816833d4e4d1e3bfc43aa74e7.1716386553.git.ludo@gnu.org |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2FE8F27BBEA; Wed, 22 May 2024 15:55:52 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A4E2727BBE2 for <patchwork@mira.cbaines.net>; Wed, 22 May 2024 15:55:51 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1s9nMr-0005T8-8x; Wed, 22 May 2024 10:55:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1s9nMp-0005SZ-V9 for guix-patches@gnu.org; Wed, 22 May 2024 10:55:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1s9nMp-0007Zi-HS; Wed, 22 May 2024 10:54:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1s9nMs-0003v9-A5; Wed, 22 May 2024 10:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71118] [PATCH 1/5] services: nscd: =?utf-8?b?4oCYbG9nLWZpbGU=?= =?utf-8?b?4oCZ?= defaults to #f. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 22 May 2024 14:55:02 +0000 Resent-Message-ID: <handler.71118.B71118.171638964615015@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71118 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71118@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Florian Pelz <pelzflorian@pelzflorian.de>, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Matthew Trzcinski <matt@excalamus.com>, Maxim Cournoyer <maxim.cournoyer@gmail.com> X-Debbugs-Original-Xcc: Florian Pelz <pelzflorian@pelzflorian.de>, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Matthew Trzcinski <matt@excalamus.com>, Maxim Cournoyer <maxim.cournoyer@gmail.com> Received: via spool by 71118-submit@debbugs.gnu.org id=B71118.171638964615015 (code B ref 71118); Wed, 22 May 2024 14:55:02 +0000 Received: (at 71118) by debbugs.gnu.org; 22 May 2024 14:54:06 +0000 Received: from localhost ([127.0.0.1]:56419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1s9nLy-0003u7-38 for submit@debbugs.gnu.org; Wed, 22 May 2024 10:54:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@gnu.org>) id 1s9nLw-0003t1-DZ for 71118@debbugs.gnu.org; Wed, 22 May 2024 10:54:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@gnu.org>) id 1s9nLk-0007Rl-GD; Wed, 22 May 2024 10:53:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=58PgpLji3JvoVQfDpvKQBKEmHPBVYo90p9Dtpb6fvG8=; b=SSYfCAyGm2s0pD03vzqH +NyN7eqr34KGRdvbiG0vUHMjO16pK4cotaATEsAQ01PcZe7v+nu+78dT2GNei7Am2FWnJf4uvIm8Y MO2lrQDcUkdv2jOrufTqtEdstEEiq6cMmWwUK60SAvLqRlc57UkYcu0nkupm0wNxD1I0aMg7uYqJ9 gVSi780icb/MIh4573B35h7+ERZ7XWw/cz3j0LhOJ7eHxQrrm9XouvGJFv32b3jtUQkGbRoCsUZ8N T8wqVVasMrcXDD+ZKoW6RSBwcXBS2rAL87U9ZVPpM4xZoKn7+Wjfvda0se2BZVE1jw+vd5i60LQec 4zNQPK8Lj3/h1g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org> Date: Wed, 22 May 2024 16:53:36 +0200 Message-ID: <91683e6a6059df7816833d4e4d1e3bfc43aa74e7.1716386553.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1716386553.git.ludo@gnu.org> References: <cover.1716386553.git.ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
More service logging to stderr
|
|
Commit Message
Ludovic Courtès
May 22, 2024, 2:53 p.m. UTC
* gnu/services/base.scm (<nscd-configuration>)[log-file]: Default to #f. * doc/guix.texi (Base Services): Clarify documentation. Change-Id: Ia75914fc2665db13bef688d53659083a615ebef4 --- doc/guix.texi | 8 +++++--- gnu/services/base.scm | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-)
Comments
Hi Ludovic, Ludovic Courtès <ludo@gnu.org> writes: > * gnu/services/base.scm (<nscd-configuration>)[log-file]: Default to #f. > * doc/guix.texi (Base Services): Clarify documentation. > > Change-Id: Ia75914fc2665db13bef688d53659083a615ebef4 > --- > doc/guix.texi | 8 +++++--- > gnu/services/base.scm | 2 +- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 8073e3f6d49..0055724e658 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -19446,9 +19446,11 @@ Base Services > Package object denoting the GNU C Library providing the @command{nscd} > command. > > -@item @code{log-file} (default: @code{"/var/log/nscd.log"}) > -Name of the nscd log file. This is where debugging output goes when > -@code{debug-level} is strictly positive. > +@item @code{log-file} (default: @code{#f}) > +Name of the nscd log file. Debugging output goes to that file when > +@code{debug-level} is strictly positive, or to standard error if it is > +@code{#f}. Regular messages are written to syslog when > +@code{debug-level} is zero, regardless of the value of @code{log-file}. Is it not a bit counter-intuitive, to have a 'log-file' field that users can set, but debug logs not going there? Perhaps we should get rid of it entirely instead?
Hi Ludo, Ludovic Courtès <ludo@gnu.org> writes: > * gnu/services/base.scm (<nscd-configuration>)[log-file]: Default to #f. > * doc/guix.texi (Base Services): Clarify documentation. > > Change-Id: Ia75914fc2665db13bef688d53659083a615ebef4 > --- > doc/guix.texi | 8 +++++--- > gnu/services/base.scm | 2 +- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index 8073e3f6d49..0055724e658 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -19446,9 +19446,11 @@ Base Services > Package object denoting the GNU C Library providing the @command{nscd} > command. > > -@item @code{log-file} (default: @code{"/var/log/nscd.log"}) > -Name of the nscd log file. This is where debugging output goes when > -@code{debug-level} is strictly positive. > +@item @code{log-file} (default: @code{#f}) > +Name of the nscd log file. Debugging output goes to that file when > +@code{debug-level} is strictly positive, or to standard error if it is > +@code{#f}. Regular messages are written to syslog when > +@code{debug-level} is zero, regardless of the value of @code{log-file}. My initial reading of the above was wrong. I guess it's fine, though I find the special case logging to /dev/error when debug-level == 0 despite log-file being set a bit surprising still.
Hi, Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > Ludovic Courtès <ludo@gnu.org> writes: > >> * gnu/services/base.scm (<nscd-configuration>)[log-file]: Default to #f. >> * doc/guix.texi (Base Services): Clarify documentation. >> >> Change-Id: Ia75914fc2665db13bef688d53659083a615ebef4 [...] >> +@item @code{log-file} (default: @code{#f}) >> +Name of the nscd log file. Debugging output goes to that file when >> +@code{debug-level} is strictly positive, or to standard error if it is >> +@code{#f}. Regular messages are written to syslog when >> +@code{debug-level} is zero, regardless of the value of @code{log-file}. > > Is it not a bit counter-intuitive, to have a 'log-file' field that users > can set, but debug logs not going there? Yeah, I had to check the code of nscd in libc, and it’s this weird. > Perhaps we should get rid of it entirely instead? I’d rather keep it to avoid gratuitous breakage and also because it’s occasionally useful when one needs to debug NSS/nscd issues. Ludo’.
Hi, Ludovic Courtès <ludo@gnu.org> writes: > Hi, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > >> Ludovic Courtès <ludo@gnu.org> writes: >> >>> * gnu/services/base.scm (<nscd-configuration>)[log-file]: Default to #f. >>> * doc/guix.texi (Base Services): Clarify documentation. >>> >>> Change-Id: Ia75914fc2665db13bef688d53659083a615ebef4 > > [...] > >>> +@item @code{log-file} (default: @code{#f}) >>> +Name of the nscd log file. Debugging output goes to that file when >>> +@code{debug-level} is strictly positive, or to standard error if it is >>> +@code{#f}. Regular messages are written to syslog when >>> +@code{debug-level} is zero, regardless of the value of @code{log-file}. >> >> Is it not a bit counter-intuitive, to have a 'log-file' field that users >> can set, but debug logs not going there? > > Yeah, I had to check the code of nscd in libc, and it’s this weird. Haha! >> Perhaps we should get rid of it entirely instead? > > I’d rather keep it to avoid gratuitous breakage and also because it’s > occasionally useful when one needs to debug NSS/nscd issues. OK. Sounds reasonable. I didn't know the weirdness was carried from the underlying software rather than our own.
diff --git a/doc/guix.texi b/doc/guix.texi index 8073e3f6d49..0055724e658 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19446,9 +19446,11 @@ Base Services Package object denoting the GNU C Library providing the @command{nscd} command. -@item @code{log-file} (default: @code{"/var/log/nscd.log"}) -Name of the nscd log file. This is where debugging output goes when -@code{debug-level} is strictly positive. +@item @code{log-file} (default: @code{#f}) +Name of the nscd log file. Debugging output goes to that file when +@code{debug-level} is strictly positive, or to standard error if it is +@code{#f}. Regular messages are written to syslog when +@code{debug-level} is zero, regardless of the value of @code{log-file}. @item @code{debug-level} (default: @code{0}) Integer denoting the debugging levels. Higher numbers mean that more diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 85160bd3abb..984670cd32c 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1285,7 +1285,7 @@ (define-record-type* <nscd-configuration> nscd-configuration make-nscd-configuration nscd-configuration? (log-file nscd-configuration-log-file ;string - (default "/var/log/nscd.log")) + (default #f)) (debug-level nscd-debug-level ;integer (default 0)) ;; TODO: See nscd.conf in glibc for other options to add.