Module Topkg.Log
Topkg log.
Reporting levels
val level : unit -> level option
level ()
is the current reporting level.
val set_level : level option -> unit
set_level l
sets the current reporting level tol
.
val level_to_string : level option -> string
level_to_string l
convertsl
to an unspecified human-readable US-ASCII string that can be parsed back bylevel_of_string
.
val level_of_string : string -> (level option, [ `Msg of string ]) Result.result
level_of_string s
parses the representation oflevel_to_string
froms
.
Log functions
type 'a msgf
= (?header:string -> ('a, Stdlib.Format.formatter, unit) Stdlib.Pervasives.format -> 'a) -> unit
val msg : level -> 'a msgf -> unit
msg l (fun m -> m fmt ...)
logs with levell
a message formatted withfmt
.
val app : 'a msgf -> unit
app
is msgApp
.
val err : 'a msgf -> unit
err
ismsg Error
.
val warn : 'a msgf -> unit
err
ismsg Warning
.
val info : 'a msgf -> unit
err
ismsg Info
.
val debug : 'a msgf -> unit
err
ismsg Debug
.