aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nar-herder.in34
1 files changed, 17 insertions, 17 deletions
diff --git a/scripts/nar-herder.in b/scripts/nar-herder.in
index 2e2563c..19ed332 100644
--- a/scripts/nar-herder.in
+++ b/scripts/nar-herder.in
@@ -84,12 +84,26 @@
(lambda (opt name arg result)
(alist-cons 'storage
arg
- (alist-delete 'storage result))))))
+ (alist-delete 'storage result))))
+
+ (option '("log-level") #t #f
+ (lambda (opt name arg result)
+ (alist-cons 'log-level
+ (let ((level (string->symbol (string-upcase arg))))
+ (if (member level %valid-log-levels)
+ level
+ (error
+ (simple-format #f "unknown log level ~A\nvalid levels are: ~A\n"
+ level
+ %valid-log-levels))))
+ (alist-delete 'log-level result))))))
(define %base-option-defaults
;; Alist of default option values
`((database . ,(string-append (getcwd) "/nar_herder.db"))
- (database-dump . ,(string-append (getcwd) "/nar_herder_dump.db"))))
+ (database-dump . ,(string-append (getcwd) "/nar_herder_dump.db"))
+
+ (log-level . DEBUG)))
(define %import-options
(list (option '("tag") #t #f
@@ -220,26 +234,12 @@
(lambda (opt name arg result)
(alist-cons 'mirror
arg
- (alist-delete 'mirror result))))
-
- (option '("log-level") #t #f
- (lambda (opt name arg result)
- (alist-cons 'log-level
- (let ((level (string->symbol (string-upcase arg))))
- (if (member level %valid-log-levels)
- level
- (error
- (simple-format #f "unknown log level ~A\nvalid levels are: ~A\n"
- level
- %valid-log-levels))))
- (alist-delete 'log-level result))))))
+ (alist-delete 'mirror result))))))
(define %server-option-defaults
'((port . 8080)
(host . "0.0.0.0")
- (log-level . DEBUG)
-
(storage-limit . "none")
(cached-compression-workers . 2)