Logger.Output
Log output.
We can have multiple log outputs, they each get a Log_event.t
. See Reporter.to_outputs
to see how to use these.
A log output. It receives Log_event.t
s and writes/sends them somewhere.
val stdout : unit -> t
val stderr : unit -> t
val to_event : emit_ev:(Log_event.t -> unit) -> unit -> t
val to_str : emit_str:(string -> unit) -> unit -> t
val to_chan : out_channel -> t
Write into the channel, as text.
val to_chan_jsonl : out_channel -> t
Write into the channel as jsonl.
val buf_pool : Stdlib.Buffer.t Imandrakit.Apool.t
Buffer pool for loggers. Please hold onto buffers for only a short period of time.