Fix cfg condition for debug logging (996a5488be)

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-09-08 03:51:05 +00:00
parent be1264965a
commit 1be7fd9247
2 changed files with 6 additions and 8 deletions

View File

@@ -53,11 +53,7 @@ macro_rules! debug_info {
}
}
pub const INFO_SPAN_LEVEL: Level = if cfg!(debug_assertions) {
Level::INFO
} else {
Level::DEBUG
};
pub const INFO_SPAN_LEVEL: Level = if logging() { Level::INFO } else { Level::DEBUG };
pub static DEBUGGER: LazyLock<bool> =
LazyLock::new(|| env::var("_").unwrap_or_default().ends_with("gdb"));
@@ -121,5 +117,7 @@ pub fn type_name<T: ?Sized>() -> &'static str { std::any::type_name::<T>() }
#[must_use]
#[inline]
pub const fn logging() -> bool {
cfg!(debug_assertions) || cfg!(tuwunel_debug) || cfg!(not(feature = "release_max_log_level"))
cfg!(debug_assertions)
|| cfg!(tuwunel_debug_logging)
|| !cfg!(feature = "release_max_log_level")
}