1 | #![allow (unused)] |
2 | |
3 | macro_rules! log { |
4 | (target: $target:expr, $lvl:expr, $($arg:tt)+) => {{ |
5 | let _ = $target; |
6 | let _ = log!($lvl, $($arg)+); |
7 | }}; |
8 | ($lvl:expr, $($arg:tt)+) => {{ |
9 | let _ = $lvl; |
10 | let _ = format_args!($($arg)+); |
11 | }}; |
12 | } |
13 | macro_rules! error { |
14 | (target: $target:expr, $($arg:tt)+) => { log!(target: $target, "" , $($arg)+) }; |
15 | ($($arg:tt)+) => { log!("" , $($arg)+) }; |
16 | } |
17 | macro_rules! warn { |
18 | (target: $target:expr, $($arg:tt)*) => { log!(target: $target, "" , $($arg)*) }; |
19 | ($($arg:tt)*) => { log!("" , $($arg)*) }; |
20 | } |
21 | macro_rules! info { |
22 | (target: $target:expr, $($arg:tt)+) => { log!(target: $target, "" , $($arg)+) }; |
23 | ($($arg:tt)+) => { log!("" , $($arg)+) }; |
24 | } |
25 | macro_rules! debug { |
26 | (target: $target:expr, $($arg:tt)+) => { log!(target: $target, "" , $($arg)+) }; |
27 | ($($arg:tt)+) => { log!("" , $($arg)+) }; |
28 | } |
29 | macro_rules! trace { |
30 | (target: $target:expr, $($arg:tt)+) => { log!(target: $target, "" , $($arg)+) }; |
31 | ($($arg:tt)+) => { log!("" , $($arg)+) }; |
32 | } |
33 | |