summaryrefslogtreecommitdiff
path: root/server/src/logger.rs
blob: fa569ee7f4a2a82d0fad1dc7c8e13d161f96f319 (plain)
1
2
3
4
5
6
7
8
9
10
11
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

pub fn setup() {
    tracing_subscriber::registry()
        .with(tracing_subscriber::EnvFilter::new(
            std::env::var("RUST_LOG")
                .unwrap_or_else(|_| "m6_ie_2022=debug,tower_http=debug".into()),
        ))
        .with(tracing_subscriber::fmt::layer())
        .init();
}