Operational Logging
Operational logging records diagnostics about the Relay process, including startup, configuration, plugins, gateway behavior, and runtime failures. It is separate from agent observability through ATOF, ATIF, OpenTelemetry, or OpenInference.
Relay writes operational logs to stderr. Optional file sinks receive additional copies of those records. Each record includes a root Relay ID for correlation.
Defaults
Without configuration, Relay uses:
infoas the minimum log level- Human-readable stderr output
- No file sinks
Choose a Configuration Source
Use the source that matches how Relay is launched:
For CLI processes, Relay selects one source in this order:
--log-*options or--log-config-pathNEMO_RELAY_LOG*environment variables[logging]in the resolved Relayconfig.toml- Built-in defaults
Sources are selected rather than merged. Rust applications explicitly choose
which LoggingRuntime initialization method to use and do not apply the CLI
precedence rules.
CLI Options
Configure the minimum level and stderr format directly:
Use an absolute TOML path when file sinks or other logging settings are needed:
Do not combine --log-config-path with --log-level or
--log-stderr-format.
Environment Variables
Set these variables for the CLI or a Rust application that initializes logging
with LoggingRuntime::configure_from_environment():
Supported values are:
NEMO_RELAY_LOG:error,warn,info,debug, ortraceNEMO_RELAY_LOG_STDERR_FORMAT:humanorjsonl
Alternatively, select an absolute TOML file:
NEMO_RELAY_LOG_CONFIG_PATH cannot be combined with the other logging
environment variables.
TOML Configuration
Logging settings use a [logging] table:
File sink paths are resolved relative to the process working directory. File
sinks use asynchronous queues, and queue_capacity cannot exceed 8,192 entries
per sink.
Rust Library API
Initialize operational logging once during application startup by choosing one of these public APIs:
LoggingRuntime::configure(config)for a constructedLoggingConfigLoggingRuntime::configure_from_environment()for environment configurationLoggingRuntime::configure_from_file_path(path)for an absolute TOML path
For example:
Keep the returned runtime alive until application shutdown so pending file records can be flushed.