1 | // Some feature combinations result in some of these macros never being used. |
---|---|
2 | // Which is fine. Just squash the warnings. |
3 | #![allow(unused_macros)] |
4 | |
5 | macro_rules! log { |
6 | ($($tt:tt)*) => { |
7 | #[cfg(feature = "logging")] |
8 | { |
9 | $($tt)* |
10 | } |
11 | } |
12 | } |
13 | |
14 | macro_rules! debug { |
15 | ($($tt:tt)*) => { log!(log::debug!($($tt)*)) } |
16 | } |
17 | |
18 | macro_rules! trace { |
19 | ($($tt:tt)*) => { log!(log::trace!($($tt)*)) } |
20 | } |
21 |