From 64d14ab709fe02bb7bcfebbfe4304af781811b43 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 22 Oct 2022 09:50:24 +0100 Subject: Clean up some logging --- .../agent-messaging/http/server.scm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm index 384e953..c3cf391 100644 --- a/guix-build-coordinator/agent-messaging/http/server.scm +++ b/guix-build-coordinator/agent-messaging/http/server.scm @@ -355,9 +355,8 @@ port. Also, the port used can be changed by passing the --port option.\n" (for-each (lambda (file) - (simple-format #t "~A: removing stale log file ~A\n" - uuid - file) + (log-msg logger 'WARN uuid ": removing stale log file " file) + (delete-file (string-append (dirname output-file-name) "/" file))) @@ -410,7 +409,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (lambda (exn) (log-msg logger 'WARN - (simple-format #f "error computing hash: ~A" exn)) + "error computing hash: " exn) (when (file-exists? file-name) (let ((md5-hash @@ -420,9 +419,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (stat:size (stat file-name)))) ;; I've seen exceptions happen here from lzip, so try ;; deleting the tmp file so that it's re-uploaded. - (log-msg logger - 'WARN - (simple-format #f "deleting ~A" file-name)) + (log-msg logger 'WARN "deleting " file-name) (delete-file file-name) (raise-exception @@ -576,9 +573,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (bytevector->nix-base32-string (with-exception-handler (lambda (exn) - (log-msg logger - 'WARN - (simple-format #f "error computing hash: ~A" exn)) + (log-msg logger 'WARN "error computing hash: " exn) (when (file-exists? file-name) (let ((md5-hash @@ -588,9 +583,7 @@ port. Also, the port used can be changed by passing the --port option.\n" (stat:size (stat file-name)))) ;; I've seen exceptions happen here from lzip, so try ;; deleting the tmp file so that it's re-uploaded. - (log-msg logger - 'WARN - (simple-format #f "deleting ~A" file-name)) + (log-msg logger 'WARN "deleting " file-name) (delete-file file-name) (raise-exception -- cgit v1.2.3