#[macro_export]
#[doc(hidden)]
macro_rules! log_warn {
($($arg:tt)*) => {
#[cfg(feature = "log")]
::log::warn!($($arg)*);
#[cfg(feature = "tracing")]
::tracing::warn!($($arg)*);
#[cfg(not(any(feature = "log", feature = "tracing")))]
{
_ = format!($($arg)*);
}
};
}
#[macro_export]
#[doc(hidden)]
macro_rules! log_debug {
($($arg:tt)*) => {
#[cfg(feature = "log")]
::log::debug!($($arg)*);
#[cfg(feature = "tracing")]
::tracing::debug!($($arg)*);
#[cfg(not(any(feature = "log", feature = "tracing")))]
{
_ = format!($($arg)*);
}
};
}
#[macro_export]
#[doc(hidden)]
macro_rules! log_info {
($($arg:tt)*) => {
#[cfg(feature = "log")]
::log::info!($($arg)*);
#[cfg(feature = "tracing")]
::tracing::info!($($arg)*);
#[cfg(not(any(feature = "log", feature = "tracing")))]
{
_ = format!($($arg)*);
}
};
}
#[macro_export]
#[doc(hidden)]
macro_rules! log_error {
($($arg:tt)*) => {
#[cfg(feature = "log")]
::log::error!($($arg)*);
#[cfg(feature = "tracing")]
::tracing::error!($($arg)*);
#[cfg(not(any(feature = "log", feature = "tracing")))]
{
_ = format!($($arg)*);
}
};
}
#[macro_export]
#[doc(hidden)]
macro_rules! log_trace {
($($arg:tt)*) => {
#[cfg(feature = "log")]
::log::trace!($($arg)*);
#[cfg(feature = "tracing")]
::tracing::trace!($($arg)*);
#[cfg(not(any(feature = "log", feature = "tracing")))]
{
_ = format!($($arg)*);
}
};
}