third_party_rust_bindgen/bindgen/log_stubs.rs

33 lines
1.0 KiB
Rust
Raw Permalink Normal View History

2020-12-23 00:34:46 +00:00
#![allow(unused)]
macro_rules! log {
2021-10-26 09:34:51 +00:00
(target: $target:expr, $lvl:expr, $($arg:tt)+) => {{
let _ = $target;
let _ = log!($lvl, $($arg)+);
2021-10-26 09:34:51 +00:00
}};
($lvl:expr, $($arg:tt)+) => {{
let _ = $lvl;
let _ = format_args!($($arg)+);
2021-10-26 09:34:51 +00:00
}};
}
macro_rules! error {
2021-10-26 09:34:51 +00:00
(target: $target:expr, $($arg:tt)+) => { log!(target: $target, "", $($arg)+) };
($($arg:tt)+) => { log!("", $($arg)+) };
}
macro_rules! warn {
2021-10-26 09:34:51 +00:00
(target: $target:expr, $($arg:tt)*) => { log!(target: $target, "", $($arg)*) };
($($arg:tt)*) => { log!("", $($arg)*) };
}
macro_rules! info {
2021-10-26 09:34:51 +00:00
(target: $target:expr, $($arg:tt)+) => { log!(target: $target, "", $($arg)+) };
($($arg:tt)+) => { log!("", $($arg)+) };
}
macro_rules! debug {
2021-10-26 09:34:51 +00:00
(target: $target:expr, $($arg:tt)+) => { log!(target: $target, "", $($arg)+) };
($($arg:tt)+) => { log!("", $($arg)+) };
}
macro_rules! trace {
2021-10-26 09:34:51 +00:00
(target: $target:expr, $($arg:tt)+) => { log!(target: $target, "", $($arg)+) };
($($arg:tt)+) => { log!("", $($arg)+) };
}