pub struct LoggingConfig {
pub level: String,
pub fmt: String,
pub include_timestamp: bool,
pub otlp_headers: HashMap<String, String>,
pub otlp_endpoint: Option<String>,
pub otlp_enabled: bool,
pub otlp_protocol: String,
pub module_levels: HashMap<String, String>,
}Fields§
§level: String§fmt: String§include_timestamp: boolWhether to include an ISO 8601 timestamp in JSON log output.
Controlled by PROVIDE_LOG_INCLUDE_TIMESTAMP (default: true).
otlp_headers: HashMap<String, String>§otlp_endpoint: Option<String>OTLP endpoint URL for logs export. Falls back to the shared
OTEL_EXPORTER_OTLP_ENDPOINT when OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
is unset. None means no endpoint configured.
otlp_enabled: boolPer-signal kill switch for the OTLP log provider. When false, the
logger provider is skipped even if otlp_endpoint is set — useful
to escape shutdown hangs against unreachable collectors without
unsetting OTEL_EXPORTER_OTLP_ENDPOINT. Controlled by
PROVIDE_LOG_OTLP_ENABLED (default: true).
otlp_protocol: StringOTLP transport protocol for logs. Empty string means default
(resolved at exporter-build time to http/protobuf). Values:
http/protobuf, http/json, grpc (the latter requires the
otel-grpc cargo feature).
module_levels: HashMap<String, String>Per-module log level overrides. Keys are module-name prefixes
(longest-prefix wins); values are level strings (TRACE/DEBUG/
INFO/WARN/ERROR). Controlled by PROVIDE_LOG_MODULE_LEVELS.
Trait Implementations§
Source§impl Clone for LoggingConfig
impl Clone for LoggingConfig
Source§fn clone(&self) -> LoggingConfig
fn clone(&self) -> LoggingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LoggingConfig
impl Debug for LoggingConfig
Source§impl Default for LoggingConfig
impl Default for LoggingConfig
Source§impl<'de> Deserialize<'de> for LoggingConfigwhere
LoggingConfig: Default,
impl<'de> Deserialize<'de> for LoggingConfigwhere
LoggingConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for LoggingConfig
Source§impl PartialEq for LoggingConfig
impl PartialEq for LoggingConfig
Source§fn eq(&self, other: &LoggingConfig) -> bool
fn eq(&self, other: &LoggingConfig) -> bool
self and other values to be equal, and is used by ==.