tracing-setup 1.0.2

this crate helps us configure tracing for a rust project. It is designed to be used with the `traced-test` crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
crate::ix!();

/// Initializes the logging subscriber.
pub fn configure_tracing() {
    static INIT: std::sync::Once = std::sync::Once::new();

    INIT.call_once(|| {
        let filter = EnvFilter::try_from_default_env()
            .unwrap_or_else(|_| EnvFilter::new("info"));

        tracing_subscriber::fmt()
            .with_env_filter(filter)
            .init();
    });
}