rolter-core 0.0.1

shared config model, domain types, errors and telemetry for rolter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use tracing_subscriber::{fmt, prelude::*, EnvFilter};

/// Initialize the global tracing subscriber.
///
/// Reads the `RUST_LOG` environment variable for filtering and falls back to
/// `info`. Safe to call more than once; subsequent calls are ignored.
pub fn init() {
    let filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info"));
    let _ = tracing_subscriber::registry()
        .with(filter)
        .with(fmt::layer())
        .try_init();
}