Subject: Re: bug#59171: [PATCH] services: guix-build-coordinator: Remove duplicate log timestamp.

From: Ludovic Courtès <[email-masked]>
Date: Mon, 14 Nov 2022 18:26:10 +0100

Hi,

Christopher Baines <[email-masked]> skribis:

> * gnu/services/guix.scm (guix-build-coordinator-shepherd-services,
> guix-build-coordinator-agent-shepherd-services,
> guix-build-coordinator-queue-builds-shepherd-services): Set
> %current-logfile-date-format to "".

[...]

> +      (start #~(lambda args
> +                 (parameterize ((%current-logfile-date-format ""))
> +                   (apply
> +                    (make-forkexec-constructor
> +                     (list #$(make-guix-build-coordinator-start-script
> +                              database-uri-string
> +                              allocation-strategy
> +                              "/var/run/guix-build-coordinator/pid"
> +                              package
> +                              #:agent-communication-uri-string
> +                              agent-communication-uri-string
> +                              #:client-communication-uri-string
> +                              client-communication-uri-string
> +                              #:hooks hooks
> +                              #:parallel-hooks parallel-hooks
> +                              #:guile guile))
> +                     #:user #$user
> +                     #:group #$group
> +                     #:pid-file "/var/run/guix-build-coordinator/pid"
> +                     ;; Allow time for migrations to run
> +                     #:pid-file-timeout 60
> +                     #:environment-variables
> +                     `(,(string-append
> +                         "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale")
> +                       "LC_ALL=en_US.utf8"
> +                       "PATH=/run/current-system/profile/bin") ; for hooks
> +                     #:log-file "/var/log/guix-build-coordinator/coordinator.log")
> +                    args))))

It’s not pretty but I don’t have anything else to offer.

Perhaps you can make it slightly less verbose by writing it like this:

  (start #~(lambda ()
             ;; Arrange so that shepherd does not add a timestamp to
             ;; the logs produced by the Coordinator.
             (parameterize …
               (fork+exec-command (list …) …))))

There are other services in a similar situation.  I wonder what we
should recommend.

Ludo’.