guix-commits
[Top][All Lists]
Advanced

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

03/03: services: nar-herder: Allow specifying the log level.


From: guix-commits
Subject: 03/03: services: nar-herder: Allow specifying the log level.
Date: Fri, 22 Apr 2022 10:34:38 -0400 (EDT)

cbaines pushed a commit to branch master
in repository guix.

commit e32cc011bbe899fda432906776702f74fa6b1450
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Apr 22 15:31:42 2022 +0100

    services: nar-herder: Allow specifying the log level.
    
    * gnu/services/guix.scm (nar-herder-configuration-log-level): New procedure.
    (nar-herder-shepherd-services): Pass the log-level to the nar-herder 
process.
    * doc/guix.texi (Nar Herder): Document configuring the log-level.
---
 doc/guix.texi         |  4 ++++
 gnu/services/guix.scm | 12 +++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index b7005f0ef1..5399584cb0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34430,6 +34430,10 @@ time-to-live (TTL) of @emph{negative} 
lookups---missing store items, for
 which the HTTP 404 code is returned.  By default, no negative TTL is
 advertised.
 
+@item @code{log-level} (default: @code{'DEBUG})
+Log level to use, specify a log level like @code{'INFO} to stop logging
+individual requests.
+
 @end table
 @end deftp
 
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index dc9bd8ad68..83c293bbb5 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -122,7 +122,8 @@
             nar-herder-configuration-port
             nar-herder-configuration-storage
             nar-herder-configuration-storage-limit
-            nar-herder-configuration-storage-nar-removal-criteria))
+            nar-herder-configuration-storage-nar-removal-criteria
+            nar-herder-configuration-log-level))
 
 ;;;; Commentary:
 ;;;
@@ -778,7 +779,9 @@ ca-certificates.crt file in the system profile."
   (ttl           nar-herder-configuration-ttl
                  (default #f))
   (negative-ttl  nar-herder-configuration-negative-ttl
-                 (default #f)))
+                 (default #f))
+  (log-level     nar-herder-configuration-log-level
+                 (default 'DEBUG)))
 
 
 (define (nar-herder-shepherd-services config)
@@ -788,7 +791,7 @@ ca-certificates.crt file in the system profile."
              database database-dump
              host port
              storage storage-limit storage-nar-removal-criteria
-             ttl negative-ttl)
+             ttl negative-ttl log-level)
 
     (unless (or mirror storage)
       (error "nar-herder: mirror or storage must be set"))
@@ -829,6 +832,9 @@ ca-certificates.crt file in the system profile."
                              '())
                       #$@(if negative-ttl
                              (list (string-append "--negative-ttl=" 
negative-ttl))
+                             '())
+                      #$@(if log-level
+                             (list (simple-format #f "--log-level=~A" 
log-level))
                              '()))
                 #:user #$user
                 #:group #$group



reply via email to

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