use tracing_subscriber::filter::LevelFilter; use tracing_subscriber::{fmt, EnvFilter}; pub fn init_tracing() { let format = fmt::format() .with_target(true) .with_source_location(false) .with_thread_names(true) .compact(); let filter = EnvFilter::try_from_default_env() .unwrap_or(EnvFilter::default().add_directive(LevelFilter::TRACE.into())); fmt().event_format(format).with_env_filter(filter).init(); }