Module 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.

type t

A log output. It receives Log_event.ts 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 filter_level : (level -> bool) -> t -> 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.