1#[cfg(not(test))]
3#[cfg(feature = "log")]
4#[macro_export]
5macro_rules! svc_log {
6 (debug, $($arg:expr),*) => { log::debug!($($arg),*) };
7 (info, $($arg:expr),*) => { log::info!($($arg),*) };
8 (warn, $($arg:expr),*) => { log::warn!($($arg),*) };
9}
10
11#[cfg(test)]
12#[cfg(feature = "log")]
13#[macro_export]
14macro_rules! svc_log {
15 (debug, $($arg:expr),*) => { println!($($arg),*) };
16 (info, $($arg:expr),*) => { println!($($arg),*) };
17 (warn, $($arg:expr),*) => { println!($($arg),*) };
18}
19
20#[cfg(feature = "defmt")]
21#[macro_export]
22macro_rules! svc_log {
23 (debug, $($arg:expr),*) => { defmt::debug!($($arg),*) };
24 (info, $($arg:expr),*) => { defmt::info!($($arg),*) };
25 (warn, $($arg:expr),*) => { defmt::warn!($($arg),*) };
26}
27
28#[cfg(not(any(feature = "log", feature = "defmt")))]
29#[macro_export]
30macro_rules! svc_log {
31 ($level:ident, $($arg:expr),*) => {{ $( let _ = $arg; )* }}
32}
33
34#[allow(unused)]
35pub(crate) use svc_log;