additional info level span adjustments

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-01-26 04:46:10 +00:00
parent af399fd517
commit 329925c661
7 changed files with 24 additions and 13 deletions

View file

@ -4,6 +4,7 @@ use std::{any::Any, panic};
// Export debug proc_macros
pub use conduwuit_macros::recursion_depth;
use tracing::Level;
// Export all of the ancillary tools from here as well.
pub use crate::{result::DebugInspect, utils::debug::*};
@ -51,6 +52,12 @@ macro_rules! debug_info {
}
}
pub const INFO_SPAN_LEVEL: Level = if cfg!(debug_assertions) {
Level::INFO
} else {
Level::DEBUG
};
pub fn set_panic_trap() {
let next = panic::take_hook();
panic::set_hook(Box::new(move |info| {