diff options
Diffstat (limited to 'kittybox-rs/src/main.rs')
-rw-r--r-- | kittybox-rs/src/main.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kittybox-rs/src/main.rs b/kittybox-rs/src/main.rs index 3136924..68d3b01 100644 --- a/kittybox-rs/src/main.rs +++ b/kittybox-rs/src/main.rs @@ -147,10 +147,18 @@ where #[tokio::main] async fn main() { use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Registry}; + Registry::default() .with(EnvFilter::from_default_env()) - .with(tracing_subscriber::fmt::layer().json()) + //.with(tracing_subscriber::fmt::layer().json()) + .with( + #[cfg(debug_assertions)] + tracing_tree::HierarchicalLayer::new(2), + #[cfg(not(debug_assertions))] + tracing_subscriber::fmt::layer().json() + ) .init(); + //let _ = tracing_log::LogTracer::init(); info!("Starting the kittybox server..."); |