Revert "Correct `use`"

This reverts commit 4ea0e42bcd.
revert-173-reduce-deps
Ethan Brierley 2024-08-28 22:37:11 +01:00 committed by GitHub
parent b49f8b2198
commit 3604b1436b
1 changed files with 5 additions and 10 deletions

View File

@ -11,13 +11,8 @@ use retry_policies::RetryPolicy;
#[cfg(feature = "tracing")] #[cfg(feature = "tracing")]
type LogLevel = ::tracing::Level; type LogLevel = ::tracing::Level;
#[cfg(feature = "tracing")]
use ::tracing as LogTracing;
#[cfg(all(feature = "log", not(feature = "tracing")))] #[cfg(all(feature = "log", not(feature = "tracing")))]
type LogLevel = ::log::Level; type LogLevel = ::log::Level;
#[cfg(all(feature = "log", not(feature = "tracing")))]
use ::log as LogTracing;
#[doc(hidden)] #[doc(hidden)]
// We need this macro because tracing expects the level to be const: // We need this macro because tracing expects the level to be const:
@ -25,11 +20,11 @@ use ::log as LogTracing;
macro_rules! log_retry { macro_rules! log_retry {
($level:expr, $($args:tt)*) => {{ ($level:expr, $($args:tt)*) => {{
match $level { match $level {
LogLevel::TRACE => LogTracing::trace!($($args)*), LogLevel::TRACE => ::tracing::trace!($($args)*),
LogLevel::DEBUG => LogTracing::debug!($($args)*), LogLevel::DEBUG => ::tracing::debug!($($args)*),
LogLevel::INFO => LogTracing::info!($($args)*), LogLevel::INFO => ::tracing::info!($($args)*),
LogLevel::WARN => LogTracing::warn!($($args)*), LogLevel::WARN => ::tracing::warn!($($args)*),
LogLevel::ERROR => LogTracing::error!($($args)*), LogLevel::ERROR => ::tracing::error!($($args)*),
} }
}}; }};
} }