pub struct TracingConfig { /* private fields */ }Expand description
Represents the application-level configuration section that covers everything
related to pre-configuring the formatted layer
provided by the tracing crate. In essence, this is the application
logging configuration.
Implementations§
Source§impl TracingConfig
impl TracingConfig
Sourcepub fn with_target(
self,
target: impl Into<String>,
verbosity: impl Into<Verbosity>,
) -> Self
pub fn with_target( self, target: impl Into<String>, verbosity: impl Into<Verbosity>, ) -> Self
Merges an extra per-target Verbosity level into this config.
Sourcepub fn with_targets<T, L>(
self,
targets: impl IntoIterator<Item = (T, L)>,
) -> Self
pub fn with_targets<T, L>( self, targets: impl IntoIterator<Item = (T, L)>, ) -> Self
Merges extra per-target Verbosity levels into this config.
Source§impl TracingConfig
impl TracingConfig
Sourcepub fn verbosity(&self) -> Verbosity
pub fn verbosity(&self) -> Verbosity
Reports the root verbosity level for this logging configuration.
Sourcepub fn flavor(&self) -> FormatFlavor
pub fn flavor(&self) -> FormatFlavor
Reports the formatting flavor for this logging configuration.
Sourcepub fn show_timestamp(&self) -> bool
pub fn show_timestamp(&self) -> bool
Reports whether this logging configuration includes the timestamp in the output.
Sourcepub fn show_target(&self) -> bool
pub fn show_target(&self) -> bool
Reports whether this logging configuration includes the target in the output.
Sourcepub fn show_file(&self) -> bool
pub fn show_file(&self) -> bool
Reports whether this logging configuration includes the file in the output.
Sourcepub fn show_line_number(&self) -> bool
pub fn show_line_number(&self) -> bool
Reports whether this logging configuration includes the line number in the output.
Sourcepub fn show_level(&self) -> bool
pub fn show_level(&self) -> bool
Reports whether this logging configuration includes the level in the output.
Sourcepub fn show_thread_id(&self) -> bool
pub fn show_thread_id(&self) -> bool
Reports whether this logging configuration includes the thread ID in the output.
Sourcepub fn show_thread_name(&self) -> bool
pub fn show_thread_name(&self) -> bool
Reports whether this logging configuration includes the thread name in the output.
Trait Implementations§
Source§impl AsRef<TracingConfig> for TracingConfig
impl AsRef<TracingConfig> for TracingConfig
Source§fn as_ref(&self) -> &TracingConfig
fn as_ref(&self) -> &TracingConfig
Source§impl Clone for TracingConfig
impl Clone for TracingConfig
Source§fn clone(&self) -> TracingConfig
fn clone(&self) -> TracingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more