#[macro_export]
macro_rules! log_trace {
($s:literal $(, $x:expr)* $(,)?) => {{
#[cfg(feature = "tracing")]
$crate::__private::tracing::trace!($s $(, $x)*);
#[cfg(feature = "log")]
$crate::__private::log::trace!($s $(, $x)*);
#[cfg(not(any(feature = "tracing", feature = "log")))]
{ let _ = ($( & $x ),*); }
}};
}
#[macro_export]
macro_rules! log_debug {
($s:literal $(, $x:expr)* $(,)?) => {{
#[cfg(feature = "tracing")]
$crate::__private::tracing::debug!($s $(, $x)*);
#[cfg(feature = "log")]
$crate::__private::log::debug!($s $(, $x)*);
#[cfg(not(any(feature = "tracing", feature = "log")))]
{ let _ = ($( & $x ),*); }
}};
}
#[macro_export]
macro_rules! log_info {
($s:literal $(, $x:expr)* $(,)?) => {{
#[cfg(feature = "tracing")]
$crate::__private::tracing::info!($s $(, $x)*);
#[cfg(feature = "log")]
$crate::__private::log::info!($s $(, $x)*);
#[cfg(not(any(feature = "tracing", feature = "log")))]
{ let _ = ($( & $x ),*); }
}};
}
#[macro_export]
macro_rules! log_warn {
($s:literal $(, $x:expr)* $(,)?) => {{
#[cfg(feature = "tracing")]
$crate::__private::tracing::warn!($s $(, $x)*);
#[cfg(feature = "log")]
$crate::__private::log::warn!($s $(, $x)*);
#[cfg(not(any(feature = "tracing", feature = "log")))]
{ let _ = ($( & $x ),*); }
}};
}
#[macro_export]
macro_rules! log_error {
($s:literal $(, $x:expr)* $(,)?) => {{
#[cfg(feature = "tracing")]
$crate::__private::tracing::error!($s $(, $x)*);
#[cfg(feature = "log")]
$crate::__private::log::error!($s $(, $x)*);
#[cfg(not(any(feature = "tracing", feature = "log")))]
{ let _ = ($( & $x ),*); }
}};
}