Struct Logging Config
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
pub struct LoggingConfig {
pub level: LogLevel,
pub stderr_format: LogFormat,
pub sinks: Vec<LogSinkConfig>,
pub flush_interval_millis: u64,
}
Operational logging configuration for LoggingRuntime::configure.
level is the process-wide minimum severity: call sites may emit any level, but records less severe than this threshold are discarded. Per-file sinks may raise their own minimum.
Fields
level: LogLevel
Minimum severity for operational logs.
stderr_format: LogFormat
Encoding for the always-on stderr sink.
sinks: Vec<LogSinkConfig>
Additional file sinks beyond stderr.
flush_interval_millis: u64
Periodic flush cadence in milliseconds applied to all file sinks. 0 disables periodic flush (shutdown flush only). Defaults to DEFAULT_FILE_FLUSH_INTERVAL_MILLIS.
Implementations
impl LoggingConfig
impl LoggingConfig
from_environment
pub fn from_environment() -> Result<Option<Self>>
Resolves logging configuration from the supported process environment.
Returns None when no logging environment variables are present. Direct level and stderr format settings may be combined. NEMO_RELAY_LOG_CONFIG_PATH selects an absolute TOML file instead and is mutually exclusive with both direct settings.
from_file_path
pub fn from_file_path(path: impl AsRef<Path>) -> Result<Self>
Loads logging configuration from an absolute TOML file containing [logging].
Trait Implementations
impl Clone for LoggingConfig
impl Clone for LoggingConfig
clone
fn clone(&self) -> LoggingConfig
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for LoggingConfig
impl Debug for LoggingConfig
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for LoggingConfig
impl Default for LoggingConfig
default
fn default() -> Self
impl PartialEq for LoggingConfig
impl PartialEq for LoggingConfig
eq
fn eq(&self, other: &LoggingConfig) -> bool
ne
fn ne(&self, other: &Rhs) -> bool
impl Eq for LoggingConfig
impl Eq for LoggingConfig
impl StructuralPartialEq for LoggingConfig
impl StructuralPartialEq for LoggingConfig