easy_logging
Module to log messages. Aimed at being both powerful and easy to use
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library easy_logging
val show_level : level -> string
val pp_level : Format.formatter -> level -> unit
type log_item = {
level : level; |
logger_name : string; |
msg : string; |
tags : string list; |
timestamp : float; |
}
val debug : bool ref
val get_logger : string -> logger
Returns a registered logger by name, creating it if does not exist.
val make_logger :
?propagate:bool ->
string ->
level ->
Handlers.desc list ->
logger
Convenience method used to fetch a logger and initialize it.
make_logger name level handlers_descs
calls get_logger with the given name
, then sets its level
, adds the handlers
, and then returns it.
Calling this function multiple times with the same name will keep adding handlers.
val handlers_config : Handlers.config ref
val set_handlers_config : Handlers.config -> unit