pub trait TracingConfig {
// Required methods
fn quiet(&self) -> u8;
fn verbose(&self) -> u8;
// Provided methods
fn with_ansi(&self) -> bool { ... }
fn with_current_span(&self) -> bool { ... }
fn with_file(&self) -> bool { ... }
fn with_line_number(&self) -> bool { ... }
fn with_level(&self) -> bool { ... }
fn with_span_events(&self) -> Option<FmtSpan> { ... }
fn with_span_list(&self) -> bool { ... }
fn with_target(&self) -> bool { ... }
fn with_thread_ids(&self) -> bool { ... }
fn with_thread_names(&self) -> bool { ... }
}Expand description
Implement this trait to supply tracing configuration that can be used to build a Layer
with functions such as full_filtered.
Required Methods§
Provided Methods§
Sourcefn with_ansi(&self) -> bool
fn with_ansi(&self) -> bool
Sets whether or not the formatter emits ANSI terminal escape codes for colors and other text formatting. This defaults to true
Sourcefn with_current_span(&self) -> bool
Available on crate feature json only.
fn with_current_span(&self) -> bool
json only.Sets whether or not the formatter will include the current span in formatted events. This defaults to false
Sourcefn with_file(&self) -> bool
fn with_file(&self) -> bool
Sets whether or not an event’s source code file path is displayed. This defaults to false
Sourcefn with_line_number(&self) -> bool
fn with_line_number(&self) -> bool
Sets whether or not an event’s source code line number is displayed. This defaults to false
Sourcefn with_level(&self) -> bool
fn with_level(&self) -> bool
Sets whether or not an event’s level is displayed. This defaults to true
Sourcefn with_span_events(&self) -> Option<FmtSpan>
fn with_span_events(&self) -> Option<FmtSpan>
Configures how synthesized events are emitted at points in the span lifecycle.
This defaults to None.
See with_span_event
Sourcefn with_span_list(&self) -> bool
Available on crate feature json only.
fn with_span_list(&self) -> bool
json only.Sets whether or not the formatter will include a list (from root to leaf) of all currently entered spans in formatted events. This defaults to false
Sourcefn with_target(&self) -> bool
fn with_target(&self) -> bool
Sets whether or not an event’s target is displayed. This defaults to false
Sourcefn with_thread_ids(&self) -> bool
fn with_thread_ids(&self) -> bool
Sets whether or not the thread ID of the current thread is displayed when formatting events. This defaults to false
Sourcefn with_thread_names(&self) -> bool
fn with_thread_names(&self) -> bool
Sets whether or not the name of the current thread is displayed when formatting events. This defaults to false