package octez-libs

  1. Overview
  2. Docs
A package that contains multiple base libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.0.tar.gz
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a

doc/octez-libs.event-logging/Tezos_event_logging/Internal_event/index.html

Module Tezos_event_logging.Internal_eventSource

This module defines a "structured event logging framework."

Internal-Event streams are like traditional logs but they have a proper Data_encoding format in order to be processed by software.

The module defines "Sinks" SINK as the receptacle for structured events: pluggable modules which can absorb (i.e. display, store, forward) the events emitted within the code-base.

Events Definitions and Registration

Sourcetype level =
  1. | Debug
  2. | Info
  3. | Notice
  4. | Warning
  5. | Error
  6. | Fatal

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

Sourcemodule Level : sig ... end

Module to manipulate values of type level.

Sourcemodule Section : sig ... end

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

Sourceval get_registered_sections : unit -> string Tezos_error_monad.TzLwtreslib.Seq.t

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

Sourceval register_section : Section.t -> unit
Sourcemodule type EVENT_DEFINITION = sig ... end

Parameters defining an inspectable type of events.

Sourcemodule type EVENT = sig ... end

Events created with Make provide the EVENT API.

Sourcemodule Make (E : EVENT_DEFINITION) : EVENT with type t = E.t

Build an event from an event-definition.

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

event_definition wraps EVENT_DEFINITION as a first class module.

Sourcemodule Generic : sig ... end

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

Sourcemodule All_definitions : sig ... end

Access to all the event definitions registered with Make.

Sourcemodule Simple : sig ... end

Simple Event Definition

Sink Definitions and Registration

Sourcemodule 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.

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

sink_definition wraps SINK_DEFINITION as a first class module.

Sourcemodule 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

Sourcemodule Lwt_worker_logger : sig ... end

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

OCaml

Innovation. Community. Security.