From b5515ea99e9a5d19ff585b803f54dfc549092c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Thu, 24 Jan 2019 13:42:06 +0100 Subject: [PATCH] Shell: continue better logging --- src/lib_shell/worker.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/lib_shell/worker.ml b/src/lib_shell/worker.ml index 78c60d2de..b237df871 100644 --- a/src/lib_shell/worker.ml +++ b/src/lib_shell/worker.ml @@ -491,7 +491,9 @@ module Make | Ok () -> loop () | Error [Canceled | Exn Lwt_pipe.Closed | Exn Lwt_dropbox.Closed ] -> - Logger.lwt_log_notice "@[Worker terminated [%a] @]" Name.pp w.name >>= fun () -> + Logger.lwt_log_notice + "@[Worker terminated [%a] @]" + Name.pp w.name >>= fun () -> do_close None | Error errs -> begin match w.current_request with @@ -505,11 +507,14 @@ module Make | Ok () -> loop () | Error ([Timeout] as errs) -> - Logger.lwt_log_notice "Worker terminated with timeout" >>= fun () -> + Logger.lwt_log_notice + "@[Worker terminated with timeout [%a] @]" + Name.pp w.name >>= fun () -> do_close (Some errs) | Error errs -> Logger.lwt_log_error - "@[Worker crashed:@,%a@]" + "@[Worker crashed [%a]:@,%a@]" + Name.pp w.name (Format.pp_print_list Error_monad.pp) errs >>= fun () -> do_close (Some errs) in loop ()