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