Imandrakit_log.LoggerMain logger
type level = Log_level.tval pp_level :
Ppx_deriving_runtime.Format.formatter ->
level ->
Ppx_deriving_runtime.unitval show_level : level -> Ppx_deriving_runtime.stringval equal_level : level -> level -> Ppx_deriving_runtime.boolmodule Log_event = Log_eventmodule Output : sig ... endLog output.
type capture_meta_hook = unit -> (string * Log_meta.t) listA metadata capture hook, returning a list of metadata
val add_capture_meta_hook : capture_meta_hook -> unitAdd a global hook, called at logging point to capture metadata from the ambient context.
val add_rich_tag : 'a Logs.Tag.def -> ('a -> Log_meta.t) -> unitSpecial tag that we convert to a Log_meta.t instead of just a string
val shutdown : t -> unitval as_reporter : t -> Logs.reporterval events : t -> Log_event.t Imandrakit.Observer.tval null : unit -> tval emit_ev : t -> Log_event.t -> unitemit_ev logger ev emits the log event through all of logger's outputs
val emit_ev_l : t -> Log_event.t list -> unitwith_no_logger () f calls f() in a context where there is no logger. Useful to avoid logging loops.
Setup log level. It will use Info by default, unless the env var "DEBUG" is set or ~debug or ~log_level is passed.
debug takes precedence over log_level which takes precedence over the env.
Setup a logger that emits into the file specified in filename or in "LOG_FILE" env, or no logger otherwise. This will cleanup at the end when the function returns.
module type LOG = sig ... endval mk_log_str : string -> (module LOG)Create a new logger with the given source.
val all_sources_str : string Iter.tParse a logging command, ie a list of "src=level" separated by ","
val setup_level_per_source_str : string -> (unit, string) resultParse a logging command from the string, and apply it.