Module Mavryk_base.Internal_event_config

Configure the event-logging framework.

The JSON-file-friendly definition of the configuration of the internal-events framework. It allows one to activate registered event sinks.

FIXME: https://gitlab.com/tezos/tezos/-/issues/4850 Config override default values, but the env MAVRYK_EVENTS_CONFIG does not. Is that what we want ?

type t
val empty : t

The empty configuration. It doesn't activate any sink.

val make_config_uri : ?level:Mavryk_event_logging.Internal_event.Level.t -> ?daily_logs:int -> ?create_dirs:bool -> ?format:string -> ?chmod:int -> ?with_pid:bool -> ?colors:bool -> ?fresh:bool -> ?section_prefixes:(string * Mavryk_event_logging.Internal_event.level) list -> [ `Stdout | `Stderr | `Path of string | `Null | `Syslog of string ] -> Uri.t

make_config_uri kind builds a configuration URI using the optional parameters with the given kind. The arguments are the options documented in Mavryk_stdlib_unix.File_descriptor_sink.

val short_stdout_uri : Uri.t

The configuration uri for an stdout sink.

val stdout : t

The configuration with only an stdout sink.

val is_empty : t -> bool

Check if the configuration is empty.

val make_custom : Uri.t list -> t

Allows to make custom list of uris.

val encoding : t Data_encoding.t

The serialization format.

val apply : t -> unit Mavryk_error_monad.Error_monad.tzresult Lwt.t

Run Mavryk_base.Internal_event.All_sinks.activate for every URI in the configuration.

val reapply : t -> unit Mavryk_error_monad.Error_monad.tzresult Lwt.t

Close all the sinks except "lwt-log://" and call apply.