diff options
author | Santo Cariotti <santo@dcariotti.me> | 2022-08-21 18:48:51 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2022-08-21 18:48:51 +0200 |
commit | 451d1db821b8d445f1bb6f1f3ad6de20f19eb85d (patch) | |
tree | 10316b0c057bd54751a461fc144fd40a80f14a84 /server/src/logger.rs | |
parent | 0b9e7dff080b3fcf3907da343e17ab73012e7207 (diff) |
Move backend to server folder
Diffstat (limited to 'server/src/logger.rs')
-rw-r--r-- | server/src/logger.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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(); +} |