Reporting levels
val level : unit -> level optionlevel () is the current reporting level.
val set_level : level option -> unitset_level l sets the current reporting level to l.
val level_to_string : level option -> stringlevel_to_string l converts l to an unspecified human-readable US-ASCII string that can be parsed back by level_of_string.
level_of_string s parses the representation of level_to_string from s.
Log functions
type 'a msgf = (?header:string -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'a) -> unitmsg l (fun m -> m fmt ...) logs with level l a message formatted with fmt.
val app : 'a msgf -> unitapp is msg App.
val err : 'a msgf -> uniterr is msg Error.
val warn : 'a msgf -> uniterr is msg Warning.
val info : 'a msgf -> uniterr is msg Info.
val debug : 'a msgf -> uniterr is msg Debug.
on_error_msg ~level r is:
vifr = Ok vuse eifr = Error (`Msg e). As a side effecteis logged with levellevel(defaults toError).