Module Tezos_event_logging.Internal_event

Events Definitions and Registration

type level =
| Debug
| Info
| Notice
| Warning
| Error
| Fatal

The relative importance of a particular event (compatible with traditional logging systems, cf. Lwt_log_core.level).

module Level : sig ... end

Module to manipulate values of type level.

module Section : sig ... end

Sections are a simple way of classifying events at the time of their emission.

val get_registered_sections : unit -> Tezos_stdlib.TzString.Set.t

All the section that has been registered. Currently, sections are registered by the `Simple` module and the `Legacy_logging` module.

val register_section : Section.t -> unit
module type EVENT_DEFINITION = sig ... end

Parameters defining an inspectable type of events.

module type EVENT = sig ... end

Events created with Make provide the EVENT API.

module Make : functor (E : EVENT_DEFINITION) -> EVENT with type t = E.t

Build an event from an event-definition.

type 'a event_definition = (module EVENT_DEFINITION with type t = 'a)

event_definition wraps EVENT_DEFINITION as a first class module.

module Generic : sig ... end

Helper functions to manipulate all kinds of events in a generic way.

module All_definitions : sig ... end

Access to all the event definitions registered with Make.

module Simple : sig ... end

Sink Definitions and Registration

module type SINK = sig ... end

An implementation of SINK is responsible for handling/storing events, for instance, a sink could be output to a file, to a database, or a simple "memory-less" forwarding mechanism.

type 'a sink_definition = (module SINK with type t = 'a)

sink_definition wraps SINK_DEFINITION as a first class module.

module All_sinks : sig ... end

Use All_sinks.register to add a new inactive sink, then All_sinks.activate to make it handle events.

Common Event Definitions

module Error_event : sig ... end

Error_event.t is a generic event to emit values of type Error_monad.error list.

module Debug_event : sig ... end

The debug-event is meant for emitting (temporarily) semi-structured data in the event stream.

module Lwt_worker_event : sig ... end

The worker event is meant for use with Lwt_utils.worker.

Compatibility With Legacy Logging

module Legacy_logging : sig ... end

The module Legacy_logging replaces the previous Logging.Make_* functors by injecting the non-structured logs into the event-logging framework. Please do not use for new modules.

Common Event-Sink Definitions

module Lwt_log_sink : sig ... end

The lwt-sink outputs pretty-printed renderings of events to the lwt-log logging framework (see the Lwt_log_core module).