GNU bug report logs -
#71118
[PATCH 0/5] More service logging to stderr
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Wed, 22 May 2024 14:05:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71118 in the body.
You can then email your comments to 71118 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 14:05:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 22 May 2024 14:05:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
This changes a few core services to log to stderr rather than
syslog, in light of the improvements made for the upcoming
Shepherd 1.0: ‘herd status’ displaying recently logged messages,
and built-in log rotation.
Thoughts?
Ludo’.
Ludovic Courtès (5):
services: nscd: ‘log-file’ defaults to #f.
services: tor: Log to stderr rather than syslog.
services: dbus: Log to stderr rather than syslog.
services: avahi: Use socket activation and log to stderr.
services: darkstat: Depend on ‘user-processes’.
doc/guix.texi | 8 +++++---
gnu/services/avahi.scm | 14 +++++++++-----
gnu/services/base.scm | 2 +-
gnu/services/dbus.scm | 8 ++++----
gnu/services/monitoring.scm | 2 +-
gnu/services/networking.scm | 5 +----
6 files changed, 21 insertions(+), 18 deletions(-)
base-commit: 9c3a8a380bcfebdb77af61532e7bfec523d7bde8
--
2.41.0
Information forwarded
to
pelzflorian <at> pelzflorian.de, ludo <at> gnu.org, matt <at> excalamus.com, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 14:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 71118 <at> debbugs.gnu.org (full text, mbox):
* 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}.
@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.
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 14:55:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 71118 <at> debbugs.gnu.org (full text, mbox):
* gnu/services/networking.scm (tor-configuration->torrc): Change ‘Log’
directive to ‘stderr’.
(tor-shepherd-service): Remove /dev/log file system mapping.
Change-Id: I2e33ad8033f884ce59d929a4181172325331efe0
---
gnu/services/networking.scm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 8e64e529abf..378e117a869 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -1001,7 +1001,7 @@ (define (tor-configuration->torrc config)
(display "\
### These lines were generated from your system configuration:
DataDirectory /var/lib/tor
-Log notice syslog\n" port)
+Log notice stderr\n" port)
(when (eq? 'unix '#$socks-socket-type)
(display "\
SocksPort unix:/var/run/tor/socks-sock
@@ -1046,9 +1046,6 @@ (define (tor-shepherd-service config)
(source "/var/lib/tor")
(target source)
(writable? #t))
- (file-system-mapping
- (source "/dev/log") ;for syslog
- (target source))
(file-system-mapping
(source "/var/run/tor")
(target source)
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 14:55:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 71118 <at> debbugs.gnu.org (full text, mbox):
* gnu/services/dbus.scm (dbus-shepherd-service): Remove ‘--syslog-only’
option and pass #:log-file unconditionally.
Change-Id: I9e42f241e08b95ff01e9ad69551bc2c7ce869d6d
---
gnu/services/dbus.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
index 8dee91a3f7b..1e1380185a4 100644
--- a/gnu/services/dbus.scm
+++ b/gnu/services/dbus.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2013-2017, 2019-2021, 2024 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong <at> gmail.com>
;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
@@ -234,12 +234,12 @@ (define dbus-shepherd-service
(requirement '(user-processes syslogd))
(start #~(make-forkexec-constructor
(list (string-append #$dbus "/bin/dbus-daemon")
- "--nofork" "--system" "--syslog-only")
+ "--nofork" "--system")
+ #:log-file "/var/log/dbus-daemon.log"
#$@(if verbose?
;; Since the verbose output goes to the console,
;; not syslog, add a log file to capture it.
- '(#:environment-variables '("DBUS_VERBOSE=1")
- #:log-file "/var/log/dbus-daemon.log")
+ '(#:environment-variables '("DBUS_VERBOSE=1"))
'())
#:pid-file "/run/dbus/pid"))
(stop #~(make-kill-destructor)))))))
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 14:55:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 71118 <at> debbugs.gnu.org (full text, mbox):
* gnu/services/avahi.scm (avahi-shepherd-service): Change to systemd
style. Remove ‘--daemonize’ option and #:pid-file. Add #:lazy-start?
and #:log-file.
Change-Id: I1915243f057ff3bbe281f46f17826f24b124f659
---
gnu/services/avahi.scm | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/gnu/services/avahi.scm b/gnu/services/avahi.scm
index 1c4220e490b..9352492bbda 100644
--- a/gnu/services/avahi.scm
+++ b/gnu/services/avahi.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014-2020, 2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2014-2020, 2022, 2024 Ludovic Courtès <ludo <at> gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -131,13 +131,17 @@ (define (avahi-shepherd-service config)
(provision '(avahi-daemon))
(requirement '(user-processes dbus-system networking))
- (start #~(make-forkexec-constructor
+ (start #~(make-systemd-constructor
(list #$(file-append avahi "/sbin/avahi-daemon")
- "--daemonize"
#$@(if debug? #~("--debug") #~())
"-f" #$config)
- #:pid-file "/run/avahi-daemon/pid"))
- (stop #~(make-kill-destructor))
+ (list (endpoint
+ (make-socket-address
+ AF_UNIX
+ "/run/avahi-daemon/socket")))
+ #:lazy-start? #f
+ #:log-file "/var/log/avahi-daemon.log"))
+ (stop #~(make-systemd-destructor))
(actions (list (shepherd-configuration-action config)))))))
(define avahi-service-type
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 14:55:04 GMT)
Full text and
rfc822 format available.
Message #20 received at 71118 <at> debbugs.gnu.org (full text, mbox):
* gnu/services/monitoring.scm (darkstat-shepherd-service): Add
‘user-processes’ to ‘requirement’.
Change-Id: I6abaefd88c6075a0379e5867838653765dfaa08e
---
gnu/services/monitoring.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm
index e698040078e..0a93c907eea 100644
--- a/gnu/services/monitoring.scm
+++ b/gnu/services/monitoring.scm
@@ -132,7 +132,7 @@ (define darkstat-shepherd-service
(shepherd-service
(documentation "Network statistics gatherer.")
(provision '(darkstat))
- (requirement '(networking))
+ (requirement '(user-processes networking))
(start #~(make-forkexec-constructor
(list #$(file-append package "/sbin/darkstat")
"-i" #$interface
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 17:24:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hi Ludovic,
Ludovic Courtès <ludo <at> 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?
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 17:28:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hi Ludo,
Ludovic Courtès <ludo <at> 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.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 17:30:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hi Ludovic,
Ludovic Courtès <ludo <at> gnu.org> writes:
> * gnu/services/networking.scm (tor-configuration->torrc): Change ‘Log’
> directive to ‘stderr’.
> (tor-shepherd-service): Remove /dev/log file system mapping.
>
> Change-Id: I2e33ad8033f884ce59d929a4181172325331efe0
> ---
> gnu/services/networking.scm | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
> index 8e64e529abf..378e117a869 100644
> --- a/gnu/services/networking.scm
> +++ b/gnu/services/networking.scm
> @@ -1001,7 +1001,7 @@ (define (tor-configuration->torrc config)
> (display "\
> ### These lines were generated from your system configuration:
> DataDirectory /var/lib/tor
> -Log notice syslog\n" port)
> +Log notice stderr\n" port)
> (when (eq? 'unix '#$socks-socket-type)
> (display "\
> SocksPort unix:/var/run/tor/socks-sock
> @@ -1046,9 +1046,6 @@ (define (tor-shepherd-service config)
> (source "/var/lib/tor")
> (target source)
> (writable? #t))
> - (file-system-mapping
> - (source "/dev/log") ;for syslog
> - (target source))
I see no functional change here; do I understand that Shepherd 1.0 will
now log (by default?) to /dev/error (stderr) instead of /dev/log
(syslog)? What is the rationale for such change?
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 17:32:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hello,
Ludovic Courtès <ludo <at> gnu.org> writes:
> * gnu/services/dbus.scm (dbus-shepherd-service): Remove ‘--syslog-only’
> option and pass #:log-file unconditionally.
>
> Change-Id: I9e42f241e08b95ff01e9ad69551bc2c7ce869d6d
> ---
> gnu/services/dbus.scm | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm
> index 8dee91a3f7b..1e1380185a4 100644
> --- a/gnu/services/dbus.scm
> +++ b/gnu/services/dbus.scm
> @@ -1,5 +1,5 @@
> ;;; GNU Guix --- Functional package management for GNU
> -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
> +;;; Copyright © 2013-2017, 2019-2021, 2024 Ludovic Courtès <ludo <at> gnu.org>
> ;;; Copyright © 2015 Sou Bunnbu <iyzsong <at> gmail.com>
> ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
> ;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
> @@ -234,12 +234,12 @@ (define dbus-shepherd-service
> (requirement '(user-processes syslogd))
> (start #~(make-forkexec-constructor
> (list (string-append #$dbus "/bin/dbus-daemon")
> - "--nofork" "--system" "--syslog-only")
> + "--nofork" "--system")
> + #:log-file "/var/log/dbus-daemon.log"
> #$@(if verbose?
> ;; Since the verbose output goes to the console,
> ;; not syslog, add a log file to capture it.
> - '(#:environment-variables '("DBUS_VERBOSE=1")
> - #:log-file "/var/log/dbus-daemon.log")
> + '(#:environment-variables '("DBUS_VERBOSE=1"))
> '())
> #:pid-file "/run/dbus/pid"))
> (stop #~(make-kill-destructor)))))))
How does logging to a file instead of to /dev/log help Shepherd
producing better output? Does it read the log file? If so, couldn't it read
syslog as well?
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Wed, 22 May 2024 17:32:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> writes:
> * gnu/services/monitoring.scm (darkstat-shepherd-service): Add
> ‘user-processes’ to ‘requirement’.
>
> Change-Id: I6abaefd88c6075a0379e5867838653765dfaa08e
Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail>
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Thu, 23 May 2024 09:26:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hi,
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> * gnu/services/networking.scm (tor-configuration->torrc): Change ‘Log’
>> directive to ‘stderr’.
>> (tor-shepherd-service): Remove /dev/log file system mapping.
>>
>> Change-Id: I2e33ad8033f884ce59d929a4181172325331efe0
[...]
> I see no functional change here; do I understand that Shepherd 1.0 will
> now log (by default?) to /dev/error (stderr) instead of /dev/log
> (syslog)? What is the rationale for such change?
Shepherd by itself doesn’t make any decision; it’s up to the service to
choose whether to log to stdout/stderr or to syslog.
As I wrote in the cover letter at <https://issues.guix.gnu.org/71118>,
Shepherd 0.10 already does a good job at handling logs, which makes
gives less of an incentive to use syslogd; on top of that, 1.0 (current
‘devel’ branch) can display messages logged to stderr/stdout directly at
the command line:
--8<---------------cut here---------------start------------->8---
$ sudo /run/current-system/profile/bin/herd status guix-publish
Status of guix-publish:
It is running since Tue 21 May 2024 08:44:57 AM CEST (2 days ago).
PID 518 running: /gnu/store/12jb83hlngklkymn52yzaw7kldr2qiwp-guix-1.4.0-20.37719d3/bin/guix publish -u guix-publish -p 8123 -C zstd:3 -C gzip:3 --nar-path=nar --listen=0.0.0.0 --advertise
It is enabled.
Provides (guix-publish).
Requires (user-processes guix-daemon avahi-daemon).
Will be respawned.
Log file: /var/log/guix-publish.log.
Recent messages:
2024-05-21 10:56:10 In web/request.scm:
2024-05-21 10:56:10 205:32 4 (read-request #<closed: file 7f5f48418af0> _)
2024-05-21 10:56:10 In web/http.scm:
2024-05-21 10:56:10 1158:12 3 (read-request-line _)
2024-05-21 10:56:10 1066:2 2 (parse-request-uri _ _ _)
2024-05-21 10:56:10 In ice-9/boot-9.scm:
2024-05-21 10:56:10 1685:16 1 (raise-exception _ #:continuable? _)
2024-05-21 10:56:10 1685:16 0 (raise-exception _ #:continuable? _)
2024-05-21 10:56:10 .Bad request: Invalid URI: 85.94.204.153:31204
2024-05-21 10:56:10
--8<---------------cut here---------------end--------------->8---
It’s a slight quality-of-life improvement.
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Thu, 23 May 2024 09:27:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hi,
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
> Ludovic Courtès <ludo <at> 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’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Fri, 24 May 2024 12:46:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hi Ludovic,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> Ludovic Courtès <ludo <at> gnu.org> writes:
>>
>>> * gnu/services/networking.scm (tor-configuration->torrc): Change ‘Log’
>>> directive to ‘stderr’.
>>> (tor-shepherd-service): Remove /dev/log file system mapping.
>>>
>>> Change-Id: I2e33ad8033f884ce59d929a4181172325331efe0
>
> [...]
>
>> I see no functional change here; do I understand that Shepherd 1.0 will
>> now log (by default?) to /dev/error (stderr) instead of /dev/log
>> (syslog)? What is the rationale for such change?
>
> Shepherd by itself doesn’t make any decision; it’s up to the service to
> choose whether to log to stdout/stderr or to syslog.
I see.
> As I wrote in the cover letter at <https://issues.guix.gnu.org/71118>,
> Shepherd 0.10 already does a good job at handling logs, which makes
> gives less of an incentive to use syslogd; on top of that, 1.0 (current
> ‘devel’ branch) can display messages logged to stderr/stdout directly at
> the command line:
>
> $ sudo /run/current-system/profile/bin/herd status guix-publish
> Status of guix-publish:
> It is running since Tue 21 May 2024 08:44:57 AM CEST (2 days ago).
> PID 518 running: /gnu/store/12jb83hlngklkymn52yzaw7kldr2qiwp-guix-1.4.0-20.37719d3/bin/guix publish -u guix-publish -p 8123 -C zstd:3 -C gzip:3 --nar-path=nar --listen=0.0.0.0 --advertise
> It is enabled.
> Provides (guix-publish).
> Requires (user-processes guix-daemon avahi-daemon).
> Will be respawned.
> Log file: /var/log/guix-publish.log.
>
> Recent messages:
> 2024-05-21 10:56:10 In web/request.scm:
> 2024-05-21 10:56:10 205:32 4 (read-request #<closed: file 7f5f48418af0> _)
> 2024-05-21 10:56:10 In web/http.scm:
> 2024-05-21 10:56:10 1158:12 3 (read-request-line _)
> 2024-05-21 10:56:10 1066:2 2 (parse-request-uri _ _ _)
> 2024-05-21 10:56:10 In ice-9/boot-9.scm:
> 2024-05-21 10:56:10 1685:16 1 (raise-exception _ #:continuable? _)
> 2024-05-21 10:56:10 1685:16 0 (raise-exception _ #:continuable? _)
> 2024-05-21 10:56:10 .Bad request: Invalid URI: 85.94.204.153:31204
> 2024-05-21 10:56:10
>
> It’s a slight quality-of-life improvement.
I agree that's more convenient than grepping /var/log/messages.
Thanks for explaining and for the Shepherd improvements!
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Fri, 24 May 2024 12:48:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hi,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> Ludovic Courtès <ludo <at> 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.
--
Thanks,
Maxim
Information forwarded
to
guix-patches <at> gnu.org
:
bug#71118
; Package
guix-patches
.
(Fri, 24 May 2024 12:48:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 71118 <at> debbugs.gnu.org (full text, mbox):
Hello,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hello,
>
> This changes a few core services to log to stderr rather than
> syslog, in light of the improvements made for the upcoming
> Shepherd 1.0: ‘herd status’ displaying recently logged messages,
> and built-in log rotation.
>
> Thoughts?
>
> Ludo’.
>
> Ludovic Courtès (5):
> services: nscd: ‘log-file’ defaults to #f.
> services: tor: Log to stderr rather than syslog.
> services: dbus: Log to stderr rather than syslog.
> services: avahi: Use socket activation and log to stderr.
> services: darkstat: Depend on ‘user-processes’.
>
Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail>
--
Thanks,
Maxim
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sun, 02 Jun 2024 18:58:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
bug acknowledged by developer.
(Sun, 02 Jun 2024 18:58:01 GMT)
Full text and
rfc822 format available.
Message #55 received at 71118-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Pushed:
20e7b892189 * services: darkstat: Depend on ‘user-processes’.
3298ec0200a * services: avahi: Use socket activation and log to stderr.
b9b0f0a995e * services: dbus: Log to stderr rather than syslog.
49e9c9ec3e8 * services: tor: Log to stderr rather than syslog.
8f0878da8d1 * services: nscd: ‘log-file’ defaults to #f.
Thanks for reviewing!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 01 Jul 2024 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 350 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.