Module Log_extended.For_testing
val create_output : map_output:(string -> string) -> Async_unix__Log.Output.t
create_output ~map_output
creates aLog.Output.t
which will print onlyMessage.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.
val create : map_output:(string -> string) -> Async_unix__Log.Level.t -> Async_unix__Log.t
create_log ~map_output level
creates aLog.t
with its level set tolevel
using the output returned bycreate_output
, and anon_error
value of `Raise.