🛈 Note: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem.

For the release documentation, please see docs.rs, instead.

tracing_subscriber::fmt

Function init

Source
pub fn init()
Available on crate features fmt and std only.
Expand description

Install a global tracing collector that listens for events and filters based on the value of the RUST_LOG environment variable.

If the tracing-log feature is enabled, this will also install the LogTracer to convert Log records into tracing Events.

This is shorthand for

tracing_subscriber::fmt().init()

ยงPanics

Panics if the initialization was unsuccessful, likely because a global collector was already installed by another call to try_init.