type level =
| App
| Error
| Warning
| Info
| Debug
val level : unit -> level option
val set_level : ?all:bool -> level option -> unit
val level_to_string : level option -> string
val level_of_string : string -> (level option, [ `Msg of string ]) result
type !'a log = ('a, unit) msgf -> unit
val debug : ?src:src -> 'a log
val kmsg : (unit -> 'b) -> ?src:src -> level -> ('a, 'b) msgf -> 'b
val on_error_msg :
?src:src ->
?level:level ->
?header:string ->
?tags:Tag.set ->
use:(unit -> 'a) ->
('a, [ `Msg of string ]) result ->
'a
module type LOG = sig ... end
val src_log : src -> (module LOG)
type reporter = {
report : 'a 'b. src ->
level ->
over:(unit -> unit) ->
(unit -> 'b) ->
('a, 'b) msgf ->
'b;
}
val set_reporter_mutex : lock:(unit -> unit) -> unlock:(unit -> unit) -> unit
val report :
src ->
level ->
over:(unit -> unit) ->
(unit -> 'b) ->
('a, 'b) msgf ->
'b
val incr_err_count : unit -> unit
val incr_warn_count : unit -> unit
val err_count : unit -> int
val warn_count : unit -> int