From f2d8e7f720c92dfb0f49d61f7b66d45e3e63e4cd Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 26 Jul 2017 12:22:38 +0100 Subject: services: Add missing wrap-lines option to tailon. * gnu/services/admin.scm (): Add wrap-lines. (tailon-configuration-wrap-lines): New procedure. (tailon-configuration-file-compiler): Add support for wrap-lines. * doc/guix.texi (Monitoring Services): Document the wrap-lines Tailon configuration option. --- gnu/services/admin.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gnu/services') diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 1044833fef..19169427c0 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -59,6 +59,8 @@ (define-module (gnu services admin) tailon-configuration-file-tail-lines tailon-configuration-file-allowed-commands tailon-configuration-file-debug? + tailon-configuration-file-wrap-lines + tailon-configuration @@ -220,7 +222,9 @@ (define-record-type* (allowed-commands tailon-configuration-file-allowed-commands (default '("tail" "grep" "awk"))) (debug? tailon-configuration-file-debug? - (default #f))) + (default #f)) + (wrap-lines tailon-configuration-file-wrap-lines + (default #t))) (define (tailon-configuration-files-string files) (string-append @@ -249,7 +253,8 @@ (define-gexp-compiler (tailon-configuration-file-compiler (match file (($ files bind relative-root allow-transfers? follow-names? - tail-lines allowed-commands debug?) + tail-lines allowed-commands debug? + wrap-lines) (text-file "tailon-config.yaml" (string-concatenate @@ -267,7 +272,8 @@ (define-gexp-compiler (tailon-configuration-file-compiler ("commands" . ,(string-append "[" (string-join allowed-commands ", ") "]")) - ,@(if debug? '(("debug" . "true")) '())))))))) + ,@(if debug? '(("debug" . "true")) '()) + ("wrap-lines" . ,(if wrap-lines "true" "false"))))))))) (define-record-type* tailon-configuration make-tailon-configuration -- cgit v1.2.3