guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

102/155: services: cuirass: Add 'log-file' option.


From: John Darrington
Subject: 102/155: services: cuirass: Add 'log-file' option.
Date: Wed, 21 Dec 2016 20:48:37 +0000 (UTC)

jmd pushed a commit to branch wip-installer
in repository guix.

commit 64a3d6e9d5767990801f0f465d15a3df1d632189
Author: Ludovic Court├Ęs <address@hidden>
Date:   Mon Dec 19 23:01:04 2016 +0100

    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'.
---
 doc/guix.texi            |    3 +++
 gnu/services/cuirass.scm |    6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index a9f9851..46d006d 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
address@hidden @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 4975a7e..8e9316f 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]