Module logging

Source
Expand description

Dynamo Distributed Logging Module.

  • Configuration loaded from:
    1. Environment variables (highest priority).
    2. Optional TOML file pointed to by the DYN_LOGGING_CONFIG_PATH environment variable.
    3. /opt/dynamo/etc/logging.toml.

Logging can take two forms: READABLE or JSONL. The default is READABLE. JSONL can be enabled by setting the DYN_LOGGING_JSONL environment variable to 1.

Filters can be configured using the DYN_LOG environment variable or by setting the filters key in the TOML configuration file. Filters are comma-separated key-value pairs where the key is the crate or module name and the value is the log level. The default log level is info.

Example:

log_level = "error"

[log_filters]
"test_logging" = "info"
"test_logging::api" = "trace"

Functionsยง

init
Initialize the logger
log_message
Log a message with file and line info Used by Python wrapper