TracingConfig

Trait TracingConfig 

Source
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§

Source

fn quiet(&self) -> u8

Get the quiet count (these are normally pulled from the command line arguments)

Source

fn verbose(&self) -> u8

Get the verbose count (these are normally pulled from the command line arguments)

Provided Methods§

Source

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

Source

fn with_current_span(&self) -> bool

Available on crate feature json only.

Sets whether or not the formatter will include the current span in formatted events. This defaults to false

Source

fn with_file(&self) -> bool

Sets whether or not an event’s source code file path is displayed. This defaults to false

Source

fn with_line_number(&self) -> bool

Sets whether or not an event’s source code line number is displayed. This defaults to false

Source

fn with_level(&self) -> bool

Sets whether or not an event’s level is displayed. This defaults to true

Source

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

Source

fn with_span_list(&self) -> bool

Available on crate feature 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

Source

fn with_target(&self) -> bool

Sets whether or not an event’s target is displayed. This defaults to false

Source

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

Source

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

Implementors§