From 9c72a39ef8ab622b47e34090b959ae580aa18b1a Mon Sep 17 00:00:00 2001 From: Anton Bachin Date: Mon, 6 Nov 2023 14:26:42 +0300 Subject: [PATCH] Log initialization: respect custom log levels Fixes #299. --- src/server/log.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/log.ml b/src/server/log.ml index b581fc5b..4718a281 100644 --- a/src/server/log.ml +++ b/src/server/log.ml @@ -435,6 +435,9 @@ struct if !enable then begin setup_outputs () ; Logs.set_level ~all:true (Some !level); + !custom_log_levels |> List.iter (fun (name, level) -> + List.assoc_opt name !sources + |> Option.iter (fun source -> Logs.Src.set_level source (Some level))); Logs.set_reporter (reporter ~now ()) end ; `Initialized