Connector.Log
Connector log messages.
This is a suggested log message format for connectors. They can be emitted by connectors to track activity and report unexpected events.
type msg = [
|
`Service_exn of exn * Stdlib.Printexc.raw_backtrace
|
`Connector_exn of exn * Stdlib.Printexc.raw_backtrace
|
`Connection_reset
|
`Trace of dur_ns * Request.t option * Response.t option
]
The type for connector log messages.
val pp_msg : Stdlib.Format.formatter -> msg -> unit
pp_log_msg
is a unspecified formatter for log messages.
val quiet : msg -> unit
quiet
is Fun.const ()
.
val default : ?ppf:Stdlib.Format.formatter -> trace:bool -> unit -> msg -> unit
default_log ~ppf ~trace
logs message on ppf
(defaults to Format
.err_formatter) and `Trace
messages iff trace
is true.