Fix some more logging name leak
The section list is only useful for functor instantiated before command line argument parsing.
This commit is contained in:
parent
dcc0f7011d
commit
892c91e3ac
@ -351,7 +351,7 @@ module Make
|
|||||||
let levels =
|
let levels =
|
||||||
[ Logging.Debug ; Info ; Notice ; Warning ; Error ; Fatal ] in
|
[ Logging.Debug ; Info ; Notice ; Warning ; Error ; Fatal ] in
|
||||||
List.map (fun l -> l, Ring.create limits.backlog_size) levels 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 ;
|
let w = { limits ; parameters ; name ; canceler ;
|
||||||
table ; buffer ; logger = (module Logger) ;
|
table ; buffer ; logger = (module Logger) ;
|
||||||
state = None ; id ;
|
state = None ; id ;
|
||||||
|
@ -45,9 +45,8 @@ let ign_log_f
|
|||||||
|
|
||||||
let sections = ref []
|
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 section = Lwt_log_core.Section.make S.name
|
||||||
|
|
||||||
let debug fmt = ign_log_f ~section ~level:Lwt_log_core.Debug fmt
|
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
|
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)
|
module Core = Make(struct let name = "core" end)
|
||||||
|
|
||||||
type level = Lwt_log_core.level =
|
type level = Lwt_log_core.level =
|
||||||
|
@ -28,6 +28,7 @@ end
|
|||||||
module Core : LOG
|
module Core : LOG
|
||||||
|
|
||||||
module Make(S: sig val name: string end) : 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 =
|
type level = Lwt_log_core.level =
|
||||||
| Debug
|
| Debug
|
||||||
|
Loading…
Reference in New Issue
Block a user