Message_templates_lwt.Lwt_loggerLwt logger implementation
Lwt logger - async logger implementation
type t = {min_level : Message_templates.Level.t;sinks : (Lwt_sink.sink_fn * Message_templates.Level.t option) list;enrichers : (Message_templates.Log_event.t ->
Message_templates.Log_event.t)
list;filters : (Message_templates.Log_event.t -> bool) list;context_properties : (string * Yojson.Safe.t) list;source : string option;}Logger implementation type
val is_enabled : t -> Message_templates.Level.t -> boolCheck if a level is enabled
val passes_filters : t -> Message_templates.Log_event.t -> boolCheck if event passes all filters
val apply_enrichers :
t ->
Message_templates.Log_event.t ->
Message_templates.Log_event.tApply all enrichers to an event
val add_context_properties :
t ->
Message_templates.Log_event.t ->
Message_templates.Log_event.tAdd context properties to an event
val write :
t ->
?exn:exn ->
Message_templates.Level.t ->
string ->
(string * Yojson.Safe.t) list ->
unit Lwt.tCore write method
val verbose :
t ->
?exn:exn ->
string ->
(string * Yojson.Safe.t) list ->
unit Lwt.tLevel-specific convenience methods
val debug :
t ->
?exn:exn ->
string ->
(string * Yojson.Safe.t) list ->
unit Lwt.tval information :
t ->
?exn:exn ->
string ->
(string * Yojson.Safe.t) list ->
unit Lwt.tval warning :
t ->
?exn:exn ->
string ->
(string * Yojson.Safe.t) list ->
unit Lwt.tval error :
t ->
?exn:exn ->
string ->
(string * Yojson.Safe.t) list ->
unit Lwt.tval fatal :
t ->
?exn:exn ->
string ->
(string * Yojson.Safe.t) list ->
unit Lwt.tCreate a contextual logger with additional property
val with_enricher :
t ->
(Message_templates.Log_event.t -> Message_templates.Log_event.t) ->
tAdd an enricher function
val create :
min_level:Message_templates.Level.t ->
sinks:(Lwt_sink.sink_fn * Message_templates.Level.t option) list ->
tCreate a logger
val flush : t -> unit Lwt.tFlush all sinks
val close : t -> unit Lwt.tClose all sinks