* [bug#35794] [PATCH] services: guix-publish: Log to a file.
@ 2019-05-18 21:36 Christopher Baines
2019-05-20 20:58 ` Ludovic Courtès
2019-05-20 20:59 ` Ludovic Courtès
0 siblings, 2 replies; 7+ messages in thread
From: Christopher Baines @ 2019-05-18 21:36 UTC (permalink / raw)
To: 35794
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#35794] [PATCH] services: guix-publish: Log to a file.
2019-05-18 21:36 [bug#35794] [PATCH] services: guix-publish: Log to a file Christopher Baines
@ 2019-05-20 20:58 ` Ludovic Courtès
2019-05-20 20:59 ` Ludovic Courtès
1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-05-20 20:58 UTC (permalink / raw)
To: Christopher Baines; +Cc: 35794
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’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#35794] [PATCH] services: guix-publish: Log to a file.
2019-05-18 21:36 [bug#35794] [PATCH] services: guix-publish: Log to a file Christopher Baines
2019-05-20 20:58 ` Ludovic Courtès
@ 2019-05-20 20:59 ` Ludovic Courtès
2019-05-31 17:28 ` [bug#35794] [PATCH] services: guix-publish: Configure log rotation Christopher Baines
2019-05-31 17:35 ` [bug#35794] [PATCH] services: guix-publish: Log to a file Christopher Baines
1 sibling, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-05-20 20:59 UTC (permalink / raw)
To: Christopher Baines; +Cc: 35794
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’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#35794] [PATCH] services: guix-publish: Configure log rotation.
2019-05-20 20:59 ` Ludovic Courtès
@ 2019-05-31 17:28 ` Christopher Baines
2019-06-07 7:45 ` Ludovic Courtès
2019-05-31 17:35 ` [bug#35794] [PATCH] services: guix-publish: Log to a file Christopher Baines
1 sibling, 1 reply; 7+ messages in thread
From: Christopher Baines @ 2019-05-31 17:28 UTC (permalink / raw)
To: 35794
* 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#35794] [PATCH] services: guix-publish: Log to a file.
2019-05-20 20:59 ` Ludovic Courtès
2019-05-31 17:28 ` [bug#35794] [PATCH] services: guix-publish: Configure log rotation Christopher Baines
@ 2019-05-31 17:35 ` Christopher Baines
1 sibling, 0 replies; 7+ messages in thread
From: Christopher Baines @ 2019-05-31 17:35 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 35794
[-- Attachment #1: Type: text/plain, Size: 527 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-06-10 7:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-18 21:36 [bug#35794] [PATCH] services: guix-publish: Log to a file Christopher Baines
2019-05-20 20:58 ` Ludovic Courtès
2019-05-20 20:59 ` Ludovic Courtès
2019-05-31 17:28 ` [bug#35794] [PATCH] services: guix-publish: Configure log rotation Christopher Baines
2019-06-07 7:45 ` Ludovic Courtès
2019-06-10 7:00 ` bug#35794: " Christopher Baines
2019-05-31 17:35 ` [bug#35794] [PATCH] services: guix-publish: Log to a file Christopher Baines
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.