[PATCH 0/3] Switch to the Shepherd's system log

  • Open
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxim Cournoyer
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote 6 days ago
(address . guix-patches@gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
cover.1738709501.git.ludo@gnu.org
Hello,

This patch series switches Guix System from Inetutils’s ‘syslogd’
to the Shepherd’s ‘system-log’. Quoth ‘news.scm’:

The advantages of this change are the fact that @code{system-log} can start
logging earlier after boot and stop shortly before shutdown, along with full
integration with the rest of @command{shepherd}, in particular with the new
@command{log-rotation} service.

Thoughts?

Ludo’.

Ludovic Courtès (3):
services: Add ‘system-log’ Shepherd service.
services: Switch to ‘shepherd-system-log-service-type’ in
‘%base-services’.
DRAFT: news: Add entry for ‘system-log’ switch.

doc/guix.texi | 72 +++++++++++++++++++++++--
etc/news.scm | 16 +++++-
gnu/services/base.scm | 2 +-
gnu/services/shepherd.scm | 108 ++++++++++++++++++++++++++++++++++++++
4 files changed, 192 insertions(+), 6 deletions(-)


base-commit: 285a1cb449f60798dc83f7f1016700b4ab2374a8
--
2.48.1
L
L
Ludovic Courtès wrote 6 days ago
[PATCH 1/3] services: Add ‘system-log ’ Shepherd service.
(address . 76063@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
f751908401fcc5af0c0aabfd156318b363a5a386.1738709501.git.ludo@gnu.org
* gnu/services/shepherd.scm (gexp-or-integer?)
(gexp-or-string?, gexp-or-string-or-false?): New procedures.
(system-log-configuration): New record type.
(shepherd-system-log-service-type): New variable.
* doc/guix.texi (Shepherd Services): Document it.

Change-Id: I1e29fe0977eb4f8026ee6a2d2f282e269c8c00b4
---
doc/guix.texi | 55 +++++++++++++++++++
gnu/services/shepherd.scm | 108 ++++++++++++++++++++++++++++++++++++++
2 files changed, 163 insertions(+)

Toggle diff (198 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index bb5f29277f..f52d79d549 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -45757,6 +45757,61 @@ Shepherd Services
on the @code{timer} service.
@end defvar
+@cindex system log service, from Shepherd
+@cindex syslogd, Shepherd system log service
+@defvar shepherd-system-log-service-type
+This service implements a @dfn{system log}, reading messages
+applications send to @file{/dev/log} and writing them to files or
+terminals according to user-defined rules. It provides functionality
+traditionally implemented by @command{syslogd} programs.
+
+The value of services of this type must be a
+@code{system-log-configuration} record, as described below.
+@end defvar
+
+@c %start of fragment
+
+@deftp {Data Type} system-log-configuration
+Available @code{system-log-configuration} fields are:
+
+@table @asis
+@item @code{provision} (default: @code{(system-log syslogd)}) (type: list-of-symbols)
+The name(s) of the system log service.
+
+@item @code{requirement} (default: @code{(root-file-system)}) (type: list-of-symbols)
+Dependencies of the system log service.
+
+@item @code{kernel-log-file} (type: gexp-or-string-or-false)
+File from which kernel messages are read, @file{/dev/kmsg} by default.
+
+@item @code{message-destination} (default: @code{#f}) (type: gexp-or-false)
+This gexp must evaluate to a procedure that, when passed a log message,
+returns the list of files to write it to; @code{#f} is equivalent to
+using @code{(default-message-destination-procedure)}. @pxref{System Log
+Service,,, shepherd,The GNU Shepherd Manual}, for information on how to
+write that procedure.
+
+@item @code{date-format} (type: gexp-or-string)
+String or string-valued gexp providing a specifying how to format
+timestamps in log file. It must be a valid string for @code{strftime},
+including delimiting space---e.g., @code{"%c "} for a format identical
+to that of traditional syslogd implementations.
+
+@item @code{history-size} (type: gexp-or-integer)
+Number of logging messages kept in memory for the purposes of making
+them available to @command{herd status system-log}.
+
+@item @code{max-silent-time} (type: gexp-or-integer)
+Time after which a mark is written to log files if nothing was logged
+during that time frame.
+
+@end table
+
+@end deftp
+
+
+@c %end of fragment
+
@defvar %shepherd-root-service
This service represents PID@tie{}1.
@end defvar
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 328bfbedff..bc31285cfb 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -31,6 +31,7 @@ (define-module (gnu services shepherd)
#:use-module ((guix diagnostics)
#:select (define-with-syntax-properties formatted-message))
#:use-module (gnu services)
+ #:use-module (gnu services configuration)
#:use-module (gnu services herd)
#:use-module (gnu packages admin)
#:use-module (ice-9 match)
@@ -84,6 +85,17 @@ (define-module (gnu services shepherd)
shepherd-timer-service-type
shepherd-transient-service-type
+ system-log-configuration
+ system-log-configuration?
+ system-log-configuration-provision
+ system-log-configuration-requirement
+ system-log-configuration-message-destination
+ system-log-configuration-date-format
+ system-log-configuration-history-size
+ system-log-configuration-max-silent-time
+
+ shepherd-system-log-service-type
+
assert-valid-graph))
;;; Commentary:
@@ -721,3 +733,99 @@ (define shepherd-transient-service-type
This runs @command{rsync} in the background, as a service that you can inspect
with @command{herd status} and stop with @command{herd stop}.")))
+
+
+;;;
+;;; System log.
+;;;
+
+(define (gexp-or-false? x)
+ (or (gexp? x) (not x)))
+
+(define (gexp-or-integer? x)
+ (or (gexp? x) (integer? x)))
+
+(define (gexp-or-string? x)
+ (or (gexp? x) (string? x)))
+
+(define (gexp-or-string-or-false? x)
+ (or (gexp-or-string? x) (not x)))
+
+(define-configuration system-log-configuration
+ (provision
+ (list-of-symbols '(system-log syslogd))
+ "The name(s) of the system log service."
+ empty-serializer)
+ (requirement
+ (list-of-symbols '(root-file-system))
+ "Dependencies of the system log service."
+ empty-serializer)
+ (kernel-log-file
+ (gexp-or-string-or-false #~(kernel-log-file))
+ "File from which kernel messages are read, @file{/dev/kmsg} by default."
+ empty-serializer)
+ (message-destination
+ (gexp-or-false #f)
+ "This gexp must evaluate to a procedure that, when passed a log message,
+returns the list of files to write it to; @code{#f} is equivalent to using
+@code{(default-message-destination-procedure)}. @pxref{System Log Service,,,
+shepherd, The GNU Shepherd Manual}, for information on how to write that
+procedure."
+ empty-serializer)
+ (date-format
+ (gexp-or-string #~default-logfile-date-format)
+ "String or string-valued gexp providing a specifying how to format
+timestamps in log file. It must be a valid string for @code{strftime},
+including delimiting space---e.g., @code{\"%c \"} for a format identical to
+that of traditional syslogd implementations."
+ empty-serializer)
+ (history-size
+ (gexp-or-integer #~(default-log-history-size))
+ "Number of logging messages kept in memory for the purposes of making them
+available to @command{herd status system-log}."
+ empty-serializer)
+ (max-silent-time
+ (gexp-or-integer #~(default-max-silent-time))
+ "Time after which a mark is written to log files if nothing was logged
+during that time frame."
+ empty-serializer))
+
+(define shepherd-system-log-service-type
+ (shepherd-service-type
+ 'shepherd-system-log
+ (lambda (config)
+ (shepherd-service
+ (documentation "Shepherd's built-in system log (syslogd).")
+ (provision (system-log-configuration-provision config))
+ (requirement (system-log-configuration-requirement config))
+ (modules '((shepherd service system-log)
+ ((shepherd support) #:select (default-logfile-date-format))
+ ((shepherd logger) #:select (default-log-history-size))))
+ (free-form
+ #~(system-log-service #:provision
+ '#$(system-log-configuration-provision config)
+ #:requirement
+ '#$(system-log-configuration-requirement config)
+
+ ;; XXX: As of Shepherd 1.0.1,
+ ;; 'default-message-destination-procedure' is not
+ ;; exported, hence this conditional.
+ #$@(match (system-log-configuration-message-destination
+ config)
+ (#f #~())
+ (value #~(#:message-destination #$value)))
+
+ #:date-format
+ #$(system-log-configuration-date-format
+ config)
+ #:history-size
+ #$(system-log-configuration-history-size config)
+ #:max-silent-time
+ #$(system-log-configuration-max-silent-time
+ config)))))
+ (system-log-configuration)
+ (description
+ "The Shepherd's @code{system-log} service plays the role of traditional
+@command{syslogd} daemons, reading data logged by daemons to @file{/dev/log}
+and writing it to several files in @file{/var/log} according to user-provided
+dispatching rules.")))
--
2.48.1
L
L
Ludovic Courtès wrote 6 days ago
[PATCH 2/3] services: Switch to ‘shepherd -system-log-service-type’ in ‘%base-service s’.
(address . 76063@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
ed4080362f4888688b8298ec2895a70648c44aaa.1738709501.git.ludo@gnu.org
* gnu/services/base.scm (%base-services): Replace ‘syslog-service-type’
by ‘shepherd-system-log-service-type’.
* doc/guix.texi (Base Services): Update ‘syslog-service-type’
documentation.
(Shepherd Services): Mention that ‘system-log-service-type’ is in
‘%base-services’. Add anchor.

Change-Id: I21082300f6a052865a6ab1bdff27fbe71f73d492
---
doc/guix.texi | 17 +++++++++++++----
gnu/services/base.scm | 2 +-
2 files changed, 14 insertions(+), 5 deletions(-)

Toggle diff (58 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index f52d79d549..fa51630852 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19867,11 +19867,17 @@ Base Services
external name servers do not even need to be queried.
@end defvar
-@cindex syslog
-@cindex logging
+@cindex syslog, with external syslogd
+@cindex logging, syslog
@defvar syslog-service-type
-Type of the service that runs the syslog daemon, whose value is a
-@code{<syslog-configuration>} object.
+Type of the service that runs the syslog daemon (@command{syslogd}),
+whose value is a @code{<syslog-configuration>} object (see below).
+
+@quotation Note
+This service is redundant with and for the most part superseded by
+@code{shepherd-system-log-service-type} (@pxref{shepherd-system-log, the
+Shepherd system log}).
+@end quotation
@end defvar
To have a modified @code{syslog-configuration} come into effect after
@@ -45757,6 +45763,7 @@ Shepherd Services
on the @code{timer} service.
@end defvar
+@anchor{shepherd-system-log}
@cindex system log service, from Shepherd
@cindex syslogd, Shepherd system log service
@defvar shepherd-system-log-service-type
@@ -45767,6 +45774,8 @@ Shepherd Services
The value of services of this type must be a
@code{system-log-configuration} record, as described below.
+
+This service is part of @code{%base-services} (@pxref{Base Services}).
@end defvar
@c %start of fragment
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 7331c030d7..9bd76d3550 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -3722,7 +3722,7 @@ (define %base-services
(cons tty %default-console-font))
'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
- (service syslog-service-type)
+ (service shepherd-system-log-service-type)
(service agetty-service-type (agetty-configuration
(extra-options '("-L")) ; no carrier detect
(term "vt100")
--
2.48.1
L
L
Ludovic Courtès wrote 6 days ago
[PATCH 3/3] DRAFT: news: Add entry for ‘system-log’ switch.
(address . 76063@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
c8c025973bf9bfc060b7cc82c6b025ebd87ffa2f.1738709501.git.ludo@gnu.org
DRAFT: Update commit ID.

* etc/news.scm: Add entry.

Change-Id: Ie3d827741a01c95f2bea908b57c707342e8f2386
---
etc/news.scm | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

Toggle diff (29 lines)
diff --git a/etc/news.scm b/etc/news.scm
index dfc64d59cd..5e1b3a8bff 100644
--- a/etc/news.scm
+++ b/etc/news.scm
@@ -35,7 +35,21 @@
(channel-news
(version 0)
- (entry (commit "616ae36e0f557cecb4abe58c5b0973b9428d25e0")
+ (entry (commit "TODO")
+ (title
+ (en "Guix System switches to the Shepherd's system log"))
+ (body
+ (en "The default system log used on Guix System and part of
+@code{%base-services} has been switched from the @command{syslogd} command of
+GNU@tie{}Inetutils to the new built-in @code{system-log} service found in
+version 1.0 of the Shepherd.
+
+The advantages of this change are the fact that @code{system-log} can start
+logging earlier after boot and stop shortly before shutdown, along with full
+integration with the rest of @command{shepherd}, in particular with the new
+@command{log-rotation} service.")))
+
+ (entry (commit "616ae36e0f557cecb4abe58c5b0973b9428d25e0")
(title
(en "Kernel persistent storage in UEFI disabled"))
(body
--
2.48.1
P
P
pelzflorian (Florian Pelz) wrote 4 days ago
Re: [bug#76063] [PATCH 3/3] DRAFT: news: Add entry for ‘system-log’ switch.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87pljv9te7.fsf@pelzflorian.de
Nice; could you add this German translation?
Toggle diff (35 lines)
diff --git a/etc/news.scm b/etc/news.scm
index 5e1b3a8bff..fb46e2c24d 100644
--- a/etc/news.scm
+++ b/etc/news.scm
@@ -37,7 +37,8 @@
(entry (commit "TODO")
(title
- (en "Guix System switches to the Shepherd's system log"))
+ (en "Guix System switches to the Shepherd's system log")
+ (de "Guix System wechselt zu Shepherds Systemprotokoll"))
(body
(en "The default system log used on Guix System and part of
@code{%base-services} has been switched from the @command{syslogd} command of
@@ -47,7 +48,17 @@
The advantages of this change are the fact that @code{system-log} can start
logging earlier after boot and stop shortly before shutdown, along with full
integration with the rest of @command{shepherd}, in particular with the new
-@command{log-rotation} service.")))
+@command{log-rotation} service.")
+ (de "Das vorgegebene Systemprotokoll, das auf Guix System benutzt
+wird und Teil von @code{%base-services} ist, wurde ausgetauscht und anstelle
+des Befehls @command{syslogd} aus den GNU@tie{}Inetutils wird der neue, in
+Version 1.0 von Shepherd eingebaute @code{system-log}-Dienst benutzt.
+
+Die Vorteile dieser Änderung sind, dass @code{system-log} schon früher nach
+dem Start Protokolle aufnehmen kann, kurz vor dem Herunterfahren damit aufhört
+und außerdem mit dem Rest von @command{shepherd} voll integriert ist,
+insbesondere mit dem neuen Dienst @command{log-rotation} zur
+Protokollrotation.")))
(entry (commit "616ae36e0f557cecb4abe58c5b0973b9428d25e0")
(title
--
2.48.1
Regards,
Florian
M
M
Maxim Cournoyer wrote 4 days ago
Re: [bug#76063] [PATCH 1/3] services: Add ‘system -log’ Shepherd service.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 76063@debbugs.gnu.org)
87v7tn6ten.fsf@gmail.com
Hello!

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (4 lines)
> * gnu/services/shepherd.scm (gexp-or-integer?)
> (gexp-or-string?, gexp-or-string-or-false?): New procedures.
> (system-log-configuration): New record type.

It's not as apparent due to coming into existence via a syntax, but
there many new symbols not listed here (such as each public field
accessor).

Toggle quote (31 lines)
> (shepherd-system-log-service-type): New variable.
> * doc/guix.texi (Shepherd Services): Document it.
>
> Change-Id: I1e29fe0977eb4f8026ee6a2d2f282e269c8c00b4
> ---
> doc/guix.texi | 55 +++++++++++++++++++
> gnu/services/shepherd.scm | 108 ++++++++++++++++++++++++++++++++++++++
> 2 files changed, 163 insertions(+)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index bb5f29277f..f52d79d549 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -45757,6 +45757,61 @@ Shepherd Services
> on the @code{timer} service.
> @end defvar
>
> +@cindex system log service, from Shepherd
> +@cindex syslogd, Shepherd system log service
> +@defvar shepherd-system-log-service-type
> +This service implements a @dfn{system log}, reading messages
> +applications send to @file{/dev/log} and writing them to files or
> +terminals according to user-defined rules. It provides functionality
> +traditionally implemented by @command{syslogd} programs.
> +
> +The value of services of this type must be a
> +@code{system-log-configuration} record, as described below.
> +@end defvar
> +
> +@c %start of fragment

Neat that you finally embraced define-configuration :-).

Side-topic: one day (TM), I'd like to work on a system that'd generate
and splice/update these fragments automatically in our doc, avoiding the
laborious copy-pasting.

[...]

Toggle quote (73 lines)
> diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
> index 328bfbedff..bc31285cfb 100644
> --- a/gnu/services/shepherd.scm
> +++ b/gnu/services/shepherd.scm
> @@ -31,6 +31,7 @@ (define-module (gnu services shepherd)
> #:use-module ((guix diagnostics)
> #:select (define-with-syntax-properties formatted-message))
> #:use-module (gnu services)
> + #:use-module (gnu services configuration)
> #:use-module (gnu services herd)
> #:use-module (gnu packages admin)
> #:use-module (ice-9 match)
> @@ -84,6 +85,17 @@ (define-module (gnu services shepherd)
> shepherd-timer-service-type
> shepherd-transient-service-type
>
> + system-log-configuration
> + system-log-configuration?
> + system-log-configuration-provision
> + system-log-configuration-requirement
> + system-log-configuration-message-destination
> + system-log-configuration-date-format
> + system-log-configuration-history-size
> + system-log-configuration-max-silent-time
> +
> + shepherd-system-log-service-type
> +
> assert-valid-graph))
>
> ;;; Commentary:
> @@ -721,3 +733,99 @@ (define shepherd-transient-service-type
>
> This runs @command{rsync} in the background, as a service that you can inspect
> with @command{herd status} and stop with @command{herd stop}.")))
> +
> +
> +;;;
> +;;; System log.
> +;;;
> +
> +(define (gexp-or-false? x)
> + (or (gexp? x) (not x)))
> +
> +(define (gexp-or-integer? x)
> + (or (gexp? x) (integer? x)))
> +
> +(define (gexp-or-string? x)
> + (or (gexp? x) (string? x)))
> +
> +(define (gexp-or-string-or-false? x)
> + (or (gexp-or-string? x) (not x)))
> +
> +(define-configuration system-log-configuration
> + (provision
> + (list-of-symbols '(system-log syslogd))
> + "The name(s) of the system log service."
> + empty-serializer)
> + (requirement
> + (list-of-symbols '(root-file-system))
> + "Dependencies of the system log service."
> + empty-serializer)
> + (kernel-log-file
> + (gexp-or-string-or-false #~(kernel-log-file))
> + "File from which kernel messages are read, @file{/dev/kmsg} by default."
> + empty-serializer)
> + (message-destination
> + (gexp-or-false #f)
> + "This gexp must evaluate to a procedure that, when passed a log message,
> +returns the list of files to write it to; @code{#f} is equivalent to using
> +@code{(default-message-destination-procedure)}. @pxref{System Log Service,,,
> +shepherd, The GNU Shepherd Manual}, for information on how to write that
> +procedure."

I think you should use just @xref here, since it's at the beginning of a
sentence and not within parentheses.

Toggle quote (5 lines)
> + empty-serializer)
> + (date-format
> + (gexp-or-string #~default-logfile-date-format)
> + "String or string-valued gexp providing a specifying how to format

s/providing a //

Toggle quote (4 lines)
> +timestamps in log file. It must be a valid string for @code{strftime},
> +including delimiting space---e.g., @code{\"%c \"} for a format identical to
> +that of traditional syslogd implementations."

Perhaps add a reference to @samp{man 3 strftime}.

Toggle quote (12 lines)
> + empty-serializer)
> + (history-size
> + (gexp-or-integer #~(default-log-history-size))
> + "Number of logging messages kept in memory for the purposes of making them
> +available to @command{herd status system-log}."
> + empty-serializer)
> + (max-silent-time
> + (gexp-or-integer #~(default-max-silent-time))
> + "Time after which a mark is written to log files if nothing was logged
> +during that time frame."
> + empty-serializer))

It seems the whole above configuration is not to be serialized, so you
should use define-configuration/no-serialization, which would save some
boring repetition of 'empty-serializer'.

Toggle quote (6 lines)
> +
> +(define shepherd-system-log-service-type
> + (shepherd-service-type
> + 'shepherd-system-log
> + (lambda (config)

I'd bind the record values here using 'match-record', which would make
the part below more concise.

Toggle quote (17 lines)
> + (shepherd-service
> + (documentation "Shepherd's built-in system log (syslogd).")
> + (provision (system-log-configuration-provision config))
> + (requirement (system-log-configuration-requirement config))
> + (modules '((shepherd service system-log)
> + ((shepherd support) #:select (default-logfile-date-format))
> + ((shepherd logger) #:select (default-log-history-size))))
> + (free-form
> + #~(system-log-service #:provision
> + '#$(system-log-configuration-provision config)
> + #:requirement
> + '#$(system-log-configuration-requirement config)
> +
> + ;; XXX: As of Shepherd 1.0.1,
> + ;; 'default-message-destination-procedure' is not
> + ;; exported, hence this conditional.

Perhaps check if we have shepherd >= 1.0.2 (?) and put the
forward-looking code in this case, with the other code path ready to be
removed after some time, if it's easy to check for the shepherd version.

Toggle quote (9 lines)
> + #$@(match (system-log-configuration-message-destination
> + config)
> + (#f #~())
> + (value #~(#:message-destination #$value)))
> +
> + #:date-format
> + #$(system-log-configuration-date-format
> + config)

Not really relevant here, but that makes me recall that Guile currently
lacks monotonic time support (time that can't move backward the
adjusting the system clock). It could make funny log time stamps.

See in srfi-19.scm:

Toggle snippet (13 lines)
;; -- we define it to be the same as TAI.
;; A different implementation of current-time-monotonic
;; will require rewriting all of the time-monotonic converters,
;; of course.

(define (current-time-monotonic)
;; Guile monotonic and TAI times are the same.
(let ((tai (current-time-tai)))
(make-time time-monotonic
(time-nanosecond tai)
(time-second tai))))

which as far as I can see uses CLOCK_REALTIME and not CLOCK_MONOTONIC as
it relies on gettimeofday(2), which has this note in its documentation:

Toggle snippet (6 lines)
The time returned by gettimeofday() is affected by discontinuous jumps
in the system time (e.g., if the system administrator manually changes
the system time). If you need a monotonically increasing clock, see
clock_gettime(2).

Perhaps we should open an issue in Guile to remember to tacle this
deficiency?


Toggle quote (10 lines)
> + #:history-size
> + #$(system-log-configuration-history-size config)
> + #:max-silent-time
> + #$(system-log-configuration-max-silent-time
> + config)))))
> + (system-log-configuration)
> + (description
> + "The Shepherd's @code{system-log} service plays the role of traditional
> +@command{syslogd} daemons, reading data logged by daemons to @file{/dev/log}

Perhaps s/daemons/services/ for the second one, to avoid repetition and
clarify these are not the same daemons.

Toggle quote (3 lines)
> +and writing it to several files in @file{/var/log} according to user-provided
> +dispatching rules.")))

Perhaps, 'several files under the @file{/var/log} directory, [...]'

Other than these small things, it LGTM.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote 4 days ago
Re: [bug#76063] [PATCH 2/3] services: Switch to ‘shepherd-system-log-service-type’ in ‘%base-services’.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 76063@debbugs.gnu.org)
87r04b6tct.fsf@gmail.com
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (9 lines)
> * gnu/services/base.scm (%base-services): Replace ‘syslog-service-type’
> by ‘shepherd-system-log-service-type’.
> * doc/guix.texi (Base Services): Update ‘syslog-service-type’
> documentation.
> (Shepherd Services): Mention that ‘system-log-service-type’ is in
> ‘%base-services’. Add anchor.
>
> Change-Id: I21082300f6a052865a6ab1bdff27fbe71f73d492

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote 4 days ago
Re: [bug#76063] [PATCH 3/3] DRAFT: news: Add entry for ‘system-log’ switch.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87msez6tb7.fsf@gmail.com
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (6 lines)
> DRAFT: Update commit ID.
>
> * etc/news.scm: Add entry.
>
> Change-Id: Ie3d827741a01c95f2bea908b57c707342e8f2386

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote 33 hours ago
Re: [bug#76063] [PATCH 1/3] services: Add ‘system -log’ Shepherd service.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 76063@debbugs.gnu.org)
87pljrtm33.fsf@gnu.org
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (30 lines)
> Not really relevant here, but that makes me recall that Guile currently
> lacks monotonic time support (time that can't move backward the
> adjusting the system clock). It could make funny log time stamps.
>
> See in srfi-19.scm:
>
> ;; -- we define it to be the same as TAI.
> ;; A different implementation of current-time-monotonic
> ;; will require rewriting all of the time-monotonic converters,
> ;; of course.
>
> (define (current-time-monotonic)
> ;; Guile monotonic and TAI times are the same.
> (let ((tai (current-time-tai)))
> (make-time time-monotonic
> (time-nanosecond tai)
> (time-second tai))))
>
>
> which as far as I can see uses CLOCK_REALTIME and not CLOCK_MONOTONIC as
> it relies on gettimeofday(2), which has this note in its documentation:
>
> The time returned by gettimeofday() is affected by discontinuous jumps
> in the system time (e.g., if the system administrator manually changes
> the system time). If you need a monotonically increasing clock, see
> clock_gettime(2).
>
> Perhaps we should open an issue in Guile to remember to tacle this
> deficiency?

Yes indeed, that’s a problem!

(Monotonic time support is available by other means like
‘get-internal-run-time’ but it would be good to fix SRFI-19.)

Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76063@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76063
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch