[bug#35656] services: mcron: Log to a file.
diff mbox series

Message ID 20190509174032.28180-1-mail@cbaines.net
State New
Headers show
Series
  • [bug#35656] services: mcron: Log to a file.
Related show

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Christopher Baines May 9, 2019, 5:40 p.m. UTC
This makes it easier to read the output, as it's recorded in a file.

* gnu/services/mcron.scm (mcron-shepherd-services): Add #:log-file to
make-forkexec-constructor.
---
 gnu/services/mcron.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès May 10, 2019, 1:09 p.m. UTC | #1
Hi,

Christopher Baines <mail@cbaines.net> skribis:

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

Good idea, LGTM!

Ludo’.
Christopher Baines May 12, 2019, 11:14 p.m. UTC | #2
Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> This makes it easier to read the output, as it's recorded in a file.
>>
>> * gnu/services/mcron.scm (mcron-shepherd-services): Add #:log-file to
>> make-forkexec-constructor.
>
> Good idea, LGTM!

I've pushed this to master now, thanks for taking a look :)

Patch
diff mbox series

diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm
index 1b232b6cba..fd84589c19 100644
--- a/gnu/services/mcron.scm
+++ b/gnu/services/mcron.scm
@@ -121,7 +121,9 @@  files."
                         (cons* "GUILE_AUTO_COMPILE=0"
                                "PATH=/run/current-system/profile/bin"
                                (remove (cut string-prefix? "PATH=" <>)
-                                       (environ)))))
+                                       (environ)))
+
+                        #:log-file "/var/log/mcron.log"))
               (stop #~(make-kill-destructor))
 
               (actions