Module Log.For_testing

val create_output : ?map_output:(string -> string) -> ?time:[ `Keep | `Omit ] -> ?tags:[ `Keep | `Omit ] -> ?level:[ `Keep | `Omit ] -> unit -> Output.t

create_output ~map_output creates a Log.Output.t which will print only Message.message to stdout, discarding any information about tags, levels, or timestamps.

map_output will be applied to each string before printing, and is expected to be used to replace portions of output or identify which log a message came from.

This function is best used with existing Log.ts, e.g. to replace Log.Global's outputs in expect tests. If you just want a full Log.t, see create below.

create_log ~map_output level creates a Log.t with its level set to level using the output returned by create_output, and an on_error value of `Raise.

val create : ?map_output:(string -> string) -> ?time:[ `Keep | `Omit ] -> ?tags:[ `Keep | `Omit ] -> ?level:[ `Keep | `Omit ] -> Level.t -> t
val transform : t -> Message_event.t -> Message_event.t option