mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
herd: Define 'shepherd-message-port'.
* gnu/services/herd.scm (shepherd-message-port): New variable. (display-message): Use it instead of 'current-error-port'.
This commit is contained in:
parent
17a5cb45d4
commit
6aeae5b90b
1 changed files with 6 additions and 1 deletions
|
@ -25,6 +25,7 @@ (define-module (gnu services herd)
|
||||||
#:use-module (srfi srfi-35)
|
#:use-module (srfi srfi-35)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:export (%shepherd-socket-file
|
#:export (%shepherd-socket-file
|
||||||
|
shepherd-message-port
|
||||||
|
|
||||||
shepherd-error?
|
shepherd-error?
|
||||||
service-not-found-error?
|
service-not-found-error?
|
||||||
|
@ -140,8 +141,12 @@ (define (raise-shepherd-error error)
|
||||||
(#f ;not an error
|
(#f ;not an error
|
||||||
#t)))
|
#t)))
|
||||||
|
|
||||||
|
(define shepherd-message-port
|
||||||
|
;; Port where messages coming from shepherd are printed.
|
||||||
|
(make-parameter (current-error-port)))
|
||||||
|
|
||||||
(define (display-message message)
|
(define (display-message message)
|
||||||
(format (current-error-port) "shepherd: ~a~%" message))
|
(format (shepherd-message-port) "shepherd: ~a~%" message))
|
||||||
|
|
||||||
(define* (invoke-action service action arguments cont)
|
(define* (invoke-action service action arguments cont)
|
||||||
"Invoke ACTION on SERVICE with ARGUMENTS. On success, call CONT with the
|
"Invoke ACTION on SERVICE with ARGUMENTS. On success, call CONT with the
|
||||||
|
|
Loading…
Reference in a new issue