Async_log_kernel.Message_eventSourceA t represents a log message with additional structured information about the statement, for use by outputs. Most outputs flatten the event to a Message.t, which predates this module and is serializable / deserializable, but has less structured information.
(This module's signature is tight / bare to keep the type extensible and backwards-compatible with previous behaviour, but this isn't intended to deter any users who may wish for an accessor to be added, especially for newer structured info in Message_sexp.t.)
val create :
?time:Core.Time_float.t ->
?source:string ->
?legacy_tags:(string * string) list ->
?level:Level.t ->
Ppx_log_types.Message_data.t ->
tConvert any structured messages to a string and map. The structured format is not recovered afterwards. This is mainly used for convenience in testing outputs.
val downgrade_to_unstructured_and_map :
t ->
f:
([ `Sexp of Core.Sexp.t | `String of string ] ->
[ `Sexp of Core.Sexp.t | `String of string ]) ->
tConvert any structured messages to the unstructured sexp format and map. The structured format is not recovered afterwards.
This is used by old code that predates the structured messages, often to censor certain fields out of log messages.