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
#[cfg(feature = "log")]
#[macro_export]
macro_rules! rustot_log {
($level:ident, $($arg:expr),*) => {
log::$level!($($arg),*);
}
}
#[cfg(all(feature = "defmt", not(feature = "log")))]
#[macro_export]
macro_rules! rustot_log {
($level:ident, $($arg:expr),*) => {
defmt::$level!($($arg),*);
}
}
#[cfg(not(any(feature = "defmt", feature = "log")))]
#[macro_export]
macro_rules! rustot_log {
($level:ident, $($arg:expr),*) => {
{
$( let _ = $arg; )*
()
}
}
}
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You must enable at most one of the following features: defmt-*, log");