Warn when config file is missing
This commit is contained in:
parent
9f6a73a8b0
commit
29402dfc0b
|
@ -14,9 +14,14 @@
|
|||
(define (spawn-configuration path)
|
||||
(actor #:name (list 'configuration-monitor path)
|
||||
(during (file-content path file->list $items)
|
||||
(log-info "config ~s: ~s" path items)
|
||||
(for [(item items)]
|
||||
(assert (config item))))))
|
||||
(cond
|
||||
[(not items)
|
||||
(log-warning "config ~s is missing" path)]
|
||||
[else
|
||||
(log-info "loading config ~s" path)
|
||||
(for [(item items)]
|
||||
(log-info "config ~s: ~s" path item)
|
||||
(assert (config item)))]))))
|
||||
|
||||
(define-syntax define/query-config
|
||||
(syntax-rules ()
|
||||
|
|
Loading…
Reference in New Issue