GNU bug report logs - #35794
[PATCH] services: guix-publish: Log to a file.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sat, 18 May 2019 21:48:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

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 35794 in the body.
You can then email your comments to 35794 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35794; Package guix-patches. (Sat, 18 May 2019 21:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 18 May 2019 21:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] services: guix-publish: Log to a file.
Date: Sat, 18 May 2019 22:36:03 +0100
This makes it easier to read the output, as it's recorded in a file.

* gnu/services/base.scm (guix-publish-shepherd-service): Add #:log-file to
make-forkexec-constructor.
---
 gnu/services/base.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index f709ca5519..4593ac202f 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1793,7 +1793,8 @@ archive' public keys, with GUIX."
                       #:environment-variables
                       (list (string-append "GUIX_LOCPATH="
                                            #$glibc-utf8-locales "/lib/locale")
-                            "LC_ALL=en_US.utf8")))
+                            "LC_ALL=en_US.utf8")
+                      #:log-file "/var/log/guix-publish.log"))
             (stop #~(make-kill-destructor)))))))
 
 (define %guix-publish-accounts
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#35794; Package guix-patches. (Mon, 20 May 2019 20:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 35794 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 35794 <at> debbugs.gnu.org
Subject: Re: [bug#35794] [PATCH] services: guix-publish: Log to a file.
Date: Mon, 20 May 2019 22:58:08 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> This makes it easier to read the output, as it's recorded in a file.
>
> * gnu/services/base.scm (guix-publish-shepherd-service): Add #:log-file to
> make-forkexec-constructor.

LGTM!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#35794; Package guix-patches. (Mon, 20 May 2019 21:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 35794 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 35794 <at> debbugs.gnu.org
Subject: Re: [bug#35794] [PATCH] services: guix-publish: Log to a file.
Date: Mon, 20 May 2019 22:59:08 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> +                      #:log-file "/var/log/guix-publish.log"))

It’d probably make sense to extend ‘rottlog-service-type’ in a
subsequent patch so that this file is automatically rotated (especially
since it can grow pretty quickly.)

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#35794; Package guix-patches. (Fri, 31 May 2019 17:29:01 GMT) Full text and rfc822 format available.

Message #14 received at 35794 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 35794 <at> debbugs.gnu.org
Subject: [PATCH] services: guix-publish: Configure log rotation.
Date: Fri, 31 May 2019 18:28:11 +0100
* gnu/services/base.scm (%guix-publish-log-rotations): New variable.
(guix-publish-service-type): Extend the rottlog-service-type.
---
 gnu/services/base.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 4593ac202f..1b3beb1c75 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1807,6 +1807,10 @@ archive' public keys, with GUIX."
          (home-directory "/var/empty")
          (shell (file-append shadow "/sbin/nologin")))))
 
+(define %guix-publish-log-rotations
+  (list (log-rotation
+         (files (list "/var/log/guix-publish.log")))))
+
 (define (guix-publish-activation config)
   (let ((cache (guix-publish-configuration-cache config)))
     (if cache
@@ -1828,6 +1832,8 @@ archive' public keys, with GUIX."
                                           guix-publish-shepherd-service)
                        (service-extension account-service-type
                                           (const %guix-publish-accounts))
+                       (service-extension rottlog-service-type
+                                          (const %guix-publish-log-rotations))
                        (service-extension activation-service-type
                                           guix-publish-activation)))
                 (default-value (guix-publish-configuration))
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#35794; Package guix-patches. (Fri, 31 May 2019 17:36:01 GMT) Full text and rfc822 format available.

Message #17 received at 35794 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 35794 <at> debbugs.gnu.org
Subject: Re: [bug#35794] [PATCH] services: guix-publish: Log to a file.
Date: Fri, 31 May 2019 18:35:32 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> +                      #:log-file "/var/log/guix-publish.log"))
>
> It’d probably make sense to extend ‘rottlog-service-type’ in a
> subsequent patch so that this file is automatically rotated (especially
> since it can grow pretty quickly.)

Sure, I've set another patch to this effect. I'm not sure what the
optimal rotation frequency is, or what the options are, so I've just
left it as the default for now.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35794; Package guix-patches. (Fri, 07 Jun 2019 07:46:02 GMT) Full text and rfc822 format available.

Message #20 received at 35794 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 35794 <at> debbugs.gnu.org
Subject: Re: [bug#35794] [PATCH] services: guix-publish: Configure log
 rotation.
Date: Fri, 07 Jun 2019 09:45:02 +0200
Christopher Baines <mail <at> cbaines.net> skribis:

> * gnu/services/base.scm (%guix-publish-log-rotations): New variable.
> (guix-publish-service-type): Extend the rottlog-service-type.

LGTM!




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Mon, 10 Jun 2019 07:01:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Mon, 10 Jun 2019 07:01:02 GMT) Full text and rfc822 format available.

Message #25 received at 35794-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 35794-done <at> debbugs.gnu.org
Subject: Re: [bug#35794] [PATCH] services: guix-publish: Configure log
 rotation.
Date: Mon, 10 Jun 2019 08:00:31 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> * gnu/services/base.scm (%guix-publish-log-rotations): New variable.
>> (guix-publish-service-type): Extend the rottlog-service-type.
>
> LGTM!

Great, I've pushed these patches now :)
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Jul 2019 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 287 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.