Skip to main content

init_logging

Function init_logging 

Source
pub fn init_logging()
Available on crate features test only.
Expand description

Initialize global logger, using the tracing_subscriber crate, with sensible defaults.

It is safe to call init_logging multiple times, and safe to call it in a binary where another test has already installed a global subscriber; in that case the installed subscriber is kept. Since cargo test does not run tests in any particular order, each must call init_logging.