pub struct XlogLayerConfig {
pub enabled: bool,
pub level: LogLevel,
pub tag: Option<String>,
pub include_spans: bool,
}Expand description
Configuration for XlogLayer.
Fields§
§enabled: boolWhether the layer should emit logs.
level: LogLevelMinimum log level to forward.
tag: Option<String>Optional tag override (defaults to Metadata::target()).
include_spans: boolInclude span names in the formatted message.
Implementations§
Source§impl XlogLayerConfig
impl XlogLayerConfig
Sourcepub fn new(level: LogLevel) -> Self
pub fn new(level: LogLevel) -> Self
Create a layer config with enabled = true, no tag override, and
span names excluded from the formatted message.
Sourcepub fn tag(self, tag: impl Into<String>) -> Self
pub fn tag(self, tag: impl Into<String>) -> Self
Override the emitted tag instead of using Metadata::target().
Sourcepub fn include_spans(self, include: bool) -> Self
pub fn include_spans(self, include: bool) -> Self
Include the current span stack in the formatted message body.
Trait Implementations§
Source§impl Clone for XlogLayerConfig
impl Clone for XlogLayerConfig
Source§fn clone(&self) -> XlogLayerConfig
fn clone(&self) -> XlogLayerConfig
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 moreAuto Trait Implementations§
impl Freeze for XlogLayerConfig
impl RefUnwindSafe for XlogLayerConfig
impl Send for XlogLayerConfig
impl Sync for XlogLayerConfig
impl Unpin for XlogLayerConfig
impl UnsafeUnpin for XlogLayerConfig
impl UnwindSafe for XlogLayerConfig
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