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_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_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
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LoggingConfig
impl PartialEq for LoggingConfig
Source§impl Serialize for LoggingConfig
impl Serialize for LoggingConfig
impl Eq for LoggingConfig
impl StructuralPartialEq for LoggingConfig
Auto Trait Implementations§
impl Freeze for LoggingConfig
impl RefUnwindSafe for LoggingConfig
impl Send for LoggingConfig
impl Sync for LoggingConfig
impl Unpin for LoggingConfig
impl UnsafeUnpin for LoggingConfig
impl UnwindSafe for LoggingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more