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

/// Setup tracing subscriber logger
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();
}