Module Webs.Connector

Connector commonalities.

Log messages

These message are emited by connector to track activity and report unexpected messages.

type log_msg = [
| `Service_exn of exn * Stdlib.Printexc.raw_backtrace
| `Connector_exn of exn * Stdlib.Printexc.raw_backtrace
| `Trace of Req.t option * Resp.t option
]

The type for connector log messages. These

val no_log : log_msg -> unit

no_log is Fun.const ().

val default_log : ?⁠ppf:Stdlib.Format.formatter -> trace:bool -> unit -> log_msg -> unit

default_log ~ppf ~trace logs message on ppf (defaults to Format.err_formatter) and `Trace messages iff trace is true.

val pp_log_msg : Stdlib.Format.formatter -> log_msg -> unit

pp_log_msg is a unspecified formatter for log messages.

val pp_exn_backtrace : kind:string -> Stdlib.Format.formatter -> (exn * Stdlib.Printexc.raw_backtrace) -> unit

pp_exn_backtrace is a formatter for exception backtraces.