From aea0e3059e2d59e11d896d4f587059f5ee6a0c03 Mon Sep 17 00:00:00 2001 From: 4cuck <40539855+4cuck@users.noreply.github.com> Date: Thu, 19 Oct 2023 01:02:32 +0200 Subject: [PATCH] less verbose release run --- src/main.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 22236a2..066d407 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,11 +38,18 @@ async fn _main() -> miette::Result<()> { tracing_subscriber::registry() .with(tracing_subscriber::EnvFilter::new( var("RUST_LOG").unwrap_or_else(|_| { - format!( + #[cfg(debug_assertions)] + return format!( "warn,tower_http=debug,migration=debug,scanner=trace,server=debug,{}=debug", env!("CARGO_PKG_NAME") ) - .into() + .into(); + #[cfg(not(debug_assertions))] + return format!( + "warn,tower_http=debug,migration=debug,scanner=info,server=info,{}=debug", + env!("CARGO_PKG_NAME") + ) + .into(); }), )) .with(tracing_subscriber::fmt::layer())