mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 20:49:29 -05:00
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.
This commit is contained in:
parent
cd9ed85b17
commit
e32cc011bb
2 changed files with 13 additions and 3 deletions
|
@ -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
|
which the HTTP 404 code is returned. By default, no negative TTL is
|
||||||
advertised.
|
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 table
|
||||||
@end deftp
|
@end deftp
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,8 @@ (define-module (gnu services guix)
|
||||||
nar-herder-configuration-port
|
nar-herder-configuration-port
|
||||||
nar-herder-configuration-storage
|
nar-herder-configuration-storage
|
||||||
nar-herder-configuration-storage-limit
|
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:
|
;;;; Commentary:
|
||||||
;;;
|
;;;
|
||||||
|
@ -778,7 +779,9 @@ (define-record-type* <nar-herder-configuration>
|
||||||
(ttl nar-herder-configuration-ttl
|
(ttl nar-herder-configuration-ttl
|
||||||
(default #f))
|
(default #f))
|
||||||
(negative-ttl nar-herder-configuration-negative-ttl
|
(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)
|
(define (nar-herder-shepherd-services config)
|
||||||
|
@ -788,7 +791,7 @@ (define (nar-herder-shepherd-services config)
|
||||||
database database-dump
|
database database-dump
|
||||||
host port
|
host port
|
||||||
storage storage-limit storage-nar-removal-criteria
|
storage storage-limit storage-nar-removal-criteria
|
||||||
ttl negative-ttl)
|
ttl negative-ttl log-level)
|
||||||
|
|
||||||
(unless (or mirror storage)
|
(unless (or mirror storage)
|
||||||
(error "nar-herder: mirror or storage must be set"))
|
(error "nar-herder: mirror or storage must be set"))
|
||||||
|
@ -829,6 +832,9 @@ (define (nar-herder-shepherd-services config)
|
||||||
'())
|
'())
|
||||||
#$@(if negative-ttl
|
#$@(if negative-ttl
|
||||||
(list (string-append "--negative-ttl=" negative-ttl))
|
(list (string-append "--negative-ttl=" negative-ttl))
|
||||||
|
'())
|
||||||
|
#$@(if log-level
|
||||||
|
(list (simple-format #f "--log-level=~A" log-level))
|
||||||
'()))
|
'()))
|
||||||
#:user #$user
|
#:user #$user
|
||||||
#:group #$group
|
#:group #$group
|
||||||
|
|
Loading…
Reference in a new issue