summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-12-19 23:01:04 +0100
committerLudovic Courtès <ludo@gnu.org>2016-12-19 23:57:19 +0100
commitb17e326f1731d7170a48cfad4d9d4c91bad7b8a4 (patch)
tree578d5f9eb2c14fa3d13fb4e3d0fe3140461fc582
parent2eadd8285ac8f8ba40a803fe7cb539403a2cf9af (diff)
downloadguix-b17e326f1731d7170a48cfad4d9d4c91bad7b8a4.tar.gz
services: cuirass: Add 'log-file' option.
* gnu/services/cuirass.scm (<cuirass-configuration>)[log-file]: New
field.
(cuirass-shepherd-service): Pass it to 'make-forkexec-constructor'.
-rw-r--r--doc/guix.texi3
-rw-r--r--gnu/services/cuirass.scm6
2 files changed, 8 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index a9f9851394..46d006df8c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11990,6 +11990,9 @@ accessible in other @code{cuirass-configuration} fields.
 Data type representing the configuration of Cuirass.
 
 @table @asis
+@item @code{log-file} (default: @code{"/var/log/cuirass.log"})
+Location of the log file.
+
 @item @code{cache-directory} (default: @code{""})
 Location of the repository cache.
 
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 4975a7e16e..8e9316ffc7 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -42,6 +42,8 @@
 (define-record-type* <cuirass-configuration>
   cuirass-configuration make-cuirass-configuration
   cuirass-configuration?
+  (log-file         cuirass-configuration-log-file ;string
+                    (default "/var/log/cuirass.log"))
   (cache-directory  cuirass-configuration-cache-directory ;string (dir-name)
                     (default ""))
   (user             cuirass-configuration-user ;string
@@ -64,6 +66,7 @@
   (and
    (cuirass-configuration? config)
    (let ((cache-directory  (cuirass-configuration-cache-directory config))
+         (log-file         (cuirass-configuration-log-file config))
          (interval         (cuirass-configuration-interval config))
          (database         (cuirass-configuration-database config))
          (specs            (cuirass-configuration-specifications config))
@@ -86,7 +89,8 @@
                             "--database" #$database
                             "--interval" #$(number->string interval)
                             #$@(if use-substitutes? '("--use-substitutes") '())
-                            #$@(if one-shot? '("--one-shot") '()))))
+                            #$@(if one-shot? '("--one-shot") '()))
+                      #:log-file #$log-file))
             (stop #~(make-kill-destructor)))))))
 
 (define (cuirass-account config)