From 987748159adb27a1833c369b25bc9f049be07b48 Mon Sep 17 00:00:00 2001 From: bain Date: Sun, 2 Jun 2024 14:51:45 +0200 Subject: [PATCH] set logging level based on build type --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index c4cbb69..be23d0b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -538,6 +538,10 @@ pub struct Authorization { #[async_std::main] async fn main() -> Result<()> { + #[cfg(debug_assertions)] + log::with_level(log::LevelFilter::Debug); + + #[cfg(not(debug_assertions))] log::with_level(log::LevelFilter::Error); let mut conf_file =