mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 04:37:00 +00:00
support field values in err! macro
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
5b1642f641
commit
5add9a8c34
4 files changed
+127
-31
No files matched your search
+5
-1
@@ -14,7 +14,7 @@ pub use crate::utils::debug::*;
|
||||
#[macro_export]
|
||||
macro_rules! debug_event {
|
||||
( $level:expr, $($x:tt)+ ) => {
|
||||
if cfg!(debug_assertions) && cfg!(not(feature = "dev_release_log_level")) {
|
||||
if $crate::debug::logging() {
|
||||
::tracing::event!( $level, $($x)+ )
|
||||
} else {
|
||||
::tracing::debug!( $($x)+ )
|
||||
@@ -88,3 +88,7 @@ pub fn panic_str(p: &Box<dyn Any + Send>) -> &'static str { p.downcast_ref::<&st
|
||||
#[inline(always)]
|
||||
#[must_use]
|
||||
pub fn type_name<T>(_: &T) -> &'static str { std::any::type_name::<T>() }
|
||||
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub const fn logging() -> bool { cfg!(debug_assertions) && cfg!(not(feature = "dev_release_log_level")) }
|
||||
Reference in new issue
Block a user