36 lines
590 B
OCaml
36 lines
590 B
OCaml
include (val Ohlog.logs "Ex")
|
|
|
|
module A = struct
|
|
include (val Ohlog.sublogs logger "A")
|
|
|
|
module B = struct
|
|
include (val Ohlog.sublogs logger "B")
|
|
|
|
let init () =
|
|
trace (fun m -> m "hello from B");
|
|
error (fun m -> m "bye from B")
|
|
end
|
|
|
|
let init () =
|
|
info (fun m -> m "hello from A");
|
|
B.init ();
|
|
debug (fun m -> m "bye from A")
|
|
end
|
|
|
|
module C = struct
|
|
include (val Ohlog.sublogs logger "C")
|
|
|
|
let init () =
|
|
warn (fun m -> m "hello from C");
|
|
A.init ();
|
|
warn (fun m -> m "bye from C");
|
|
end
|
|
|
|
;;
|
|
|
|
Ohlog.init ()
|
|
~min_level:TRACE
|
|
;;
|
|
|
|
C.init ()
|