[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/10: services: guix: Add 'log-file' configuration option.
From: |
Ludovic Courtès |
Subject: |
10/10: services: guix: Add 'log-file' configuration option. |
Date: |
Mon, 19 Dec 2016 22:58:30 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit dc0ef095b32f57a935764d40530af0b32a01d715
Author: Ludovic Courtès <address@hidden>
Date: Mon Dec 19 23:54:39 2016 +0100
services: guix: Add 'log-file' configuration option.
* gnu/services/base.scm (<guix-configuration>)[log-file]: New field.
(guix-shepherd-service): Pass #:log-file to 'make-forkexec-constructor'.
* gnu/services/admin.scm (simple-rotation-config): Take a list of
files and join them with commas.
(%default-rotations): Add /var/log/guix-daemon.log.
* doc/guix.texi (Base Services): Document it.
---
doc/guix.texi | 4 ++++
gnu/services/admin.scm | 7 ++++---
gnu/services/base.scm | 8 ++++++--
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 7c37468..bb96385 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8299,6 +8299,10 @@ The list of URLs where to look for substitutes by
default.
@item @code{extra-options} (default: @code{'()})
List of extra command-line options for @command{guix-daemon}.
address@hidden @code{log-file} (default: @code{"/var/log/guix-daemon.log"})
+File where @command{guix-daemon}'s standard output and standard error
+are written.
+
@item @code{lsof} (default: @var{lsof})
The lsof package to use.
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index d8086b7..deaf677 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -58,8 +58,8 @@
}
"))
-(define (simple-rotation-config file)
- (string-append file " {
+(define (simple-rotation-config files)
+ #~(string-append #$(string-join files ",") " {
sharedscripts
}
"))
@@ -72,7 +72,8 @@
(display #$(syslog-rotation-config %rotated-files)
port)
(display #$(simple-rotation-config
- "/var/log/shepherd.log")
+ '("/var/log/shepherd.log"
+ "/var/log/guix-daemon.log"))
port)))))))
(define (default-jobs rottlog)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index f2bac29..1b1ce0d 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1089,6 +1089,8 @@ failed to register hydra.gnu.org public key: ~a~%"
status))))))))
(default %default-substitute-urls))
(extra-options guix-configuration-extra-options ;list of strings
(default '()))
+ (log-file guix-configuration-log-file ;string
+ (default "/var/log/guix-daemon.log"))
(lsof guix-configuration-lsof ;<package>
(default lsof)))
@@ -1101,7 +1103,7 @@ failed to register hydra.gnu.org public key: ~a~%"
status))))))))
(($ <guix-configuration> guix build-group build-accounts
authorize-key? keys
use-substitutes? substitute-urls extra-options
- lsof)
+ log-file lsof)
(list (shepherd-service
(documentation "Run the Guix daemon.")
(provision '(guix-daemon))
@@ -1118,7 +1120,9 @@ failed to register hydra.gnu.org public key: ~a~%"
status))))))))
;; Add 'lsof' (for the GC) to the daemon's $PATH.
#:environment-variables
- (list (string-append "PATH=" #$lsof "/bin"))))
+ (list (string-append "PATH=" #$lsof "/bin"))
+
+ #:log-file #$log-file))
(stop #~(make-kill-destructor)))))))
(define (guix-accounts config)
- branch master updated (acb5f7c -> dc0ef09), Ludovic Courtès, 2016/12/19
- 05/10: gnu: cuirass: Add Git to 'PATH'., Ludovic Courtès, 2016/12/19
- 07/10: services: cuirass: Honor 'user' and 'group'., Ludovic Courtès, 2016/12/19
- 09/10: services: guix: Remove dependency on lsh., Ludovic Courtès, 2016/12/19
- 08/10: services: cuirass: Cache defaults to /var/cache/cuirass., Ludovic Courtès, 2016/12/19
- 06/10: services: cuirass: Add 'log-file' option., Ludovic Courtès, 2016/12/19
- 04/10: gnu: utox: Fix description., Ludovic Courtès, 2016/12/19
- 01/10: install: The list of services is now a plain list., Ludovic Courtès, 2016/12/19
- 03/10: gnu: utox: Update to 0.11.0., Ludovic Courtès, 2016/12/19
- 02/10: gnu: Add c-toxcore., Ludovic Courtès, 2016/12/19
- 10/10: services: guix: Add 'log-file' configuration option.,
Ludovic Courtès <=