package tezos-base
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-base.unix/Tezos_base_unix/Internal_event_unix/index.html
Module Tezos_base_unix.Internal_event_unixSource
Configure the event-logging framework for UNIx-based applications.
The JSON-file-friendly definition of the configuration of the internal-events framework. It allows one to activate registered event sinks.
This is the environment variable name that contains the a list of URIs on which events can be reported (see init).
val init :
?log_cfg:Tezos_stdlib_unix.Lwt_log_sink_unix.cfg ->
?internal_events:Tezos_base.Internal_event_config.t ->
unit ->
unit Lwt.tInitialize the internal-event sinks by looking at the ?internal_events argument and then at the (whitespace separated) list of URIs in the "TEZOS_EVENTS_CONFIG" environment variable, if an URI does not have a scheme it is expected to be a path to a configuration JSON file (cf. Configuration.of_file), e.g.: export TEZOS_EVENTS_CONFIG="unix-files:///tmp/events-unix debug://", or export TEZOS_EVENTS_CONFIG="debug:// /path/to/config.json".
The function also initializes the Lwt_log_sink_unix module (corresponding to the "TEZOS_LOG" environment variable).
internal_eventsis the value of configured sinks of command calling init.
log_cfgis the configuration specific to the default sinks if applicable.
Call close on all the sinks.
make_with_defaults ?enable_default_daily_logs_at ?internal_events creates internal event configuration using default values depending on parameters.
- If
internal_eventsis provided, nothing is modified. Otherwise default values are used.
enable_default_daily_logs_atadds daily rotating sink at the given path with the following value:"file-descriptor-path:///<daily_logs_path>/daily.log ?create-dirs=true&daily-logs=7§ion-prefix=info&format=pp"
val make_with_defaults :
?internal_events:Tezos_base.Internal_event_config.t ->
?enable_default_daily_logs_at:string ->
unit ->
Tezos_base.Internal_event_config.tval init_with_defaults :
?internal_events:Tezos_base.Internal_event_config.t ->
?enable_default_daily_logs_at:string ->
?log_cfg:Tezos_stdlib_unix.Lwt_log_sink_unix.cfg ->
unit ->
unit Lwt.tCalls init with the same arguments as make_with_defaults