Library
Module
Module type
Parameter
Class
Class type
Each of these methods takes an optional string list
of tags, then a set of parameters the way a printf function does. If the log level of the instance is low enough, a log item will be created theb passed to the handlers.
Example :
logger#warning "Unexpected value: %s" (to_string my_value)
method flash : 'a. ?tags:string list -> ('a, unit, string, unit) format4 -> 'a
method error : 'a. ?tags:string list -> ('a, unit, string, unit) format4 -> 'a
method warning : 'a. ?tags:string list ->
('a, unit, string, unit) format4 ->
'a
method info : 'a. ?tags:string list -> ('a, unit, string, unit) format4 -> 'a
method trace : 'a. ?tags:string list -> ('a, unit, string, unit) format4 -> 'a
method debug : 'a. ?tags:string list -> ('a, unit, string, unit) format4 -> 'a
Each of these methods takes a string lazy_t
as an input (as well as the optional tags. If the log level of the instance is low enough, the lazy value will forced into a string
, a log item will be created then passed to the handlers.
Example:
logger#ldebug (lazy (heavy_calculation () ))
Each of these methods takes a string
as an input (as well as the optional tags).
Example:
logger#sdebug string_variable
method internal_level : level
method set_level : level -> unit
Sets the log level of the logger instance.
method add_handler : Easy_logging_yojson.Handlers.t -> unit
Adds a handler to the logger instance.
method get_handlers : Easy_logging_yojson.Handlers.t list
method set_handlers : Easy_logging_yojson.Handlers.t list -> unit
Will add a tag to each log message, resulting from the call of the supplied fonction (called each time a message is logged)
Sets the propagate attribute, which decides whether messages passed to this logger are propagated to its ancestors' handlers.
method get_handlers_propagate : Easy_logging_yojson.Handlers.t list
Returns the list of handlers of the logger, recursing with parents handlers if propagate is true
method effective_level : level
Returns this logger level if it is not None
, else searches amongst ancestors for the first defined level; returns NoLevel
if no level can be found.