macros: add dbg macro
This commit is contained in:
parent
ccb9d3eef5
commit
3b31a7d433
1 changed files with 19 additions and 0 deletions
|
|
@ -772,3 +772,22 @@ macro_rules! jay_allow_realtime_config_so {
|
|||
"JAY_ALLOW_REALTIME_CONFIG_SO"
|
||||
};
|
||||
}
|
||||
|
||||
#[allow(clippy::allow_attributes, unused_macros)]
|
||||
macro_rules! dbg {
|
||||
($val:expr) => {
|
||||
match $val {
|
||||
tmp => {
|
||||
log::warn!(
|
||||
"[{}:{}:{}] {} = {:#?}",
|
||||
file!(),
|
||||
line!(),
|
||||
column!(),
|
||||
stringify!($val),
|
||||
&tmp
|
||||
);
|
||||
tmp
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue