Expand description
Dynamo Distributed Logging Module.
- Configuration loaded from:
- Environment variables (highest priority).
- Optional TOML file pointed to by the
DYN_LOGGING_CONFIG_PATH
environment variable. /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
.
To use local timezone for logging timestamps, set the DYN_LOG_USE_LOCAL_TZ
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"
Structs§
Traits§
Functions§
- get_
distributed_ tracing_ context - init
- Initialize the logger
- is_
valid_ span_ id - Validate a given span ID according to W3C Trace Context specifications. A valid span ID is a 16-character hexadecimal string (lowercase).
- is_
valid_ trace_ id - Validate a given trace ID according to W3C Trace Context specifications. A valid trace ID is a 32-character hexadecimal string (lowercase).
- log_
message - Log a message with file and line info Used by Python wrapper
- make_
request_ span - parse_
traceparent - Parse a traceparent string into its components