diff options
author | Christopher Baines <mail@cbaines.net> | 2020-11-08 21:27:05 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-11-08 21:27:05 +0000 |
commit | dd9572c745d0b40bd6f0ca0c5b6284bb342d5da6 (patch) | |
tree | e857d31be757f8000a5cfe78aefa04a9c17bc6c1 | |
parent | 98f50831612b9d1253ae8ca2bceb547fed373f41 (diff) | |
download | build-coordinator-dd9572c745d0b40bd6f0ca0c5b6284bb342d5da6.tar build-coordinator-dd9572c745d0b40bd6f0ca0c5b6284bb342d5da6.tar.gz |
Add logging around hook processing
This might help work out why it gets stuck.
-rw-r--r-- | guix-build-coordinator/coordinator.scm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm index 18952ad..e531bd6 100644 --- a/guix-build-coordinator/coordinator.scm +++ b/guix-build-coordinator/coordinator.scm @@ -429,7 +429,13 @@ (catch #t (lambda () + (log-msg (build-coordinator-logger build-coordinator) + 'DEBUG + "processing " event " event: " arguments) (apply handler build-coordinator arguments) + (log-msg (build-coordinator-logger build-coordinator) + 'DEBUG + event " handler finished") (datastore-delete-unprocessed-hook-event datastore id) ;; If this is the hook for a successful build, once the hook @@ -444,8 +450,9 @@ #:label-values `((event . ,event)))) (lambda (key . args) - (simple-format #t "error: running ~A hook: ~A ~A\n" - event key args) + (log-msg (build-coordinator-logger build-coordinator) + 'ERROR + "error running " event " hook: " key " " args) (metric-increment failure-counter-metric #:label-values `((event . ,event))) @@ -459,9 +466,9 @@ (lambda () (with-exception-handler (lambda (exn) - (simple-format (current-error-port) - "error: ~A thread: ~A\n" - event-name exn) + (log-msg (build-coordinator-logger build-coordinator) + 'CRITICAL + "hook processing thread " event-name " exception: " exn) (exit 1)) (lambda () (process-events event-name handler)))))))) |