Module Internal_event.Make

Build an event from an event-definition.

Parameters

Signature

include EVENT_DEFINITION with type t = E.t
type t = E.t
val section : Section.t option

Defines an optional section for the event.

Warning None is only for legacy events and should not be used in new code.

val name : string

Defines the identifier for the event. Names should be unique and are restricted to alphanumeric characters or ".@-_+=,~".

val simple_name : string

Defines the bare identifier for the event.

Since name can be prefixed by the section, simple_name holds the unmodified name provided when creating an event.

val doc : string

A display-friendly text which describes what the event means.

val pp : all_fields:bool -> block:bool -> Stdlib.Format.formatter -> t -> unit
val encoding : t Data_encoding.t
val level : level

Return the preferred level for a given event instance.

val alternative_color : alternative_color option
val emit : ?section:Section.t -> t -> unit Tezos_error_monad.Error_monad.tzresult Lwt.t

Output an event of type t, if no sinks are listening the function won't be applied.

val emit_at_top_level : ?section:Section.t -> t -> unit

Registers an event of type t to be output when event sinks activate. Does not output anything if called after sink activation.