From 451d1db821b8d445f1bb6f1f3ad6de20f19eb85d Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sun, 21 Aug 2022 18:48:51 +0200 Subject: Move backend to server folder --- server/src/logger.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 server/src/logger.rs (limited to 'server/src/logger.rs') diff --git a/server/src/logger.rs b/server/src/logger.rs new file mode 100644 index 0000000..fa569ee --- /dev/null +++ b/server/src/logger.rs @@ -0,0 +1,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(); +} -- cgit v1.2.3-18-g5258