Module type Logs.LOG

module type LOG = sig .. end
The type for source specific logging functions.


Log functions


val msg : Logs.level -> 'a Logs.log
msg l fmt (fun m -> m ...) logs with level l a message formatted with fmt. For the semantics of levels see the the usage conventions.
val app : 'a Logs.log
app is msg App.
val err : 'a Logs.log
app is msg Error.
val warn : 'a Logs.log
warn is msg Warning.
val info : 'a Logs.log
info is msg Info.
val debug : 'a Logs.log
debug is msg Debug.
val kmsg : (unit -> 'a) ->
Logs.level ->
('b, Format.formatter, unit, 'a) Pervasives.format4 ->
((?header:string -> ?tags:Logs.Tag.set -> 'b) -> 'a) -> 'a
kmsg k is like Logs.LOG.msg but calls k for returning.

Logging result value Errors


val on_error : ?level:Logs.level ->
?header:string ->
?tags:Logs.Tag.set ->
pp:(Format.formatter -> 'b -> unit) ->
use:('b -> 'a) -> ('a, 'b) Result.result -> 'a
on_error ~level ~pp ~use r is:
val on_error_msg : ?level:Logs.level ->
?header:string ->
?tags:Logs.Tag.set ->
use:(unit -> 'a) -> ('a, [ `Msg of string ]) Result.result -> 'a
on_error_msg is like Logs.LOG.on_error but uses Format.pp_print_text to format the message.