diff mbox series

[bug#35794] services: guix-publish: Log to a file.

Message ID 20190518213603.31145-1-mail@cbaines.net
State Accepted
Headers show
Series [bug#35794] services: guix-publish: Log to a file. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Christopher Baines May 18, 2019, 9:36 p.m. UTC
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(-)

Comments

Ludovic Courtès May 20, 2019, 8:58 p.m. UTC | #1
Christopher Baines <mail@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’.
Ludovic Courtès May 20, 2019, 8:59 p.m. UTC | #2
Christopher Baines <mail@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’.
Christopher Baines May 31, 2019, 5:35 p.m. UTC | #3
Ludovic Courtès <ludo@gnu.org> writes:

> Christopher Baines <mail@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.
diff mbox series

Patch

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