diff --git a/src/lib_shell/worker.ml b/src/lib_shell/worker.ml index 52d139b29..6102b526c 100644 --- a/src/lib_shell/worker.ml +++ b/src/lib_shell/worker.ml @@ -351,7 +351,7 @@ module Make let levels = [ Logging.Debug ; Info ; Notice ; Warning ; Error ; Fatal ] in List.map (fun l -> l, Ring.create limits.backlog_size) levels in - let module Logger = Logging.Make(struct let name = id_name end) in + let module Logger = Logging.Make_unregistered(struct let name = id_name end) in let w = { limits ; parameters ; name ; canceler ; table ; buffer ; logger = (module Logger) ; state = None ; id ; diff --git a/src/lib_stdlib/logging.ml b/src/lib_stdlib/logging.ml index cf0132dd7..5739e9ca8 100644 --- a/src/lib_stdlib/logging.ml +++ b/src/lib_stdlib/logging.ml @@ -45,9 +45,8 @@ let ign_log_f let sections = ref [] -module Make(S : sig val name: string end) : LOG = struct +module Make_unregistered(S : sig val name: string end) : LOG = struct - let () = sections := S.name :: !sections let section = Lwt_log_core.Section.make S.name let debug fmt = ign_log_f ~section ~level:Lwt_log_core.Debug fmt @@ -66,6 +65,13 @@ module Make(S : sig val name: string end) : LOG = struct end +module Make(S : sig val name: string end) : LOG = struct + + let () = sections := S.name :: !sections + include Make_unregistered(S) + +end + module Core = Make(struct let name = "core" end) type level = Lwt_log_core.level = diff --git a/src/lib_stdlib/logging.mli b/src/lib_stdlib/logging.mli index 706b656b6..4f66c5cd0 100644 --- a/src/lib_stdlib/logging.mli +++ b/src/lib_stdlib/logging.mli @@ -28,6 +28,7 @@ end module Core : LOG module Make(S: sig val name: string end) : LOG +module Make_unregistered(S: sig val name: string end) : LOG type level = Lwt_log_core.level = | Debug