diff options
Diffstat (limited to 'src/logger.rs')
-rw-r--r-- | src/logger.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/logger.rs b/src/logger.rs new file mode 100644 index 0000000..3f3ff0f --- /dev/null +++ b/src/logger.rs @@ -0,0 +1,11 @@ +use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt}; + +/// Setup tracing subscriber logger +pub fn setup() { + tracing_subscriber::registry() + .with(tracing_subscriber::EnvFilter::new( + crate::config::CONFIG.rust_log.clone(), + )) + .with(tracing_subscriber::fmt::layer()) + .init(); +} |