module Log: sig
.. end
Log.
Log
include Assemblage.Log
Log level and output
val level : unit -> level option
level ()
is the log level (if any). If the log level is (Some l)
any message whose level is <= l
is logged. If level is None
no message is ever logged. Initially the level is (Some Warning)
.
val set_level : level option -> unit
val set_formatter : [ `All | `Level of level ] -> Format.formatter -> unit
set_formatter spec ppf
sets the formatter for a given level or
for all the levels according to spec
. Initially the formatter
of level Show
is Format.std_formatter
and all the other level
formatters are Format.err_formatter
.
Log monitoring
val err_count : unit -> int
err_count ()
is the number of messages logged with level Error
.
val warn_count : unit -> int
warn_count ()
is the number of messages logged with level
Warning
.