Skip to main content

init_tracing

Function init_tracing 

Source
pub fn init_tracing<T: AsRef<str>>(
    name: T,
    quiet: bool,
    verbose: u8,
) -> Result<(bool, LevelFilter), ShellError>
Expand description

Initialise the global tracing/logging subscriber.

Sets up a compact stderr logger and installs a panic hook that logs panics. When the tracing-log feature is enabled, also bridges the log crate to tracing so that libraries using log::* macros are captured.

Returns (is_verbose, level_filter) on success.

ยงErrors

Returns ShellError::Internal if a log tracer or tracing subscriber is already set.