mirror of
https://github.com/TrueLayer/reqwest-middleware.git
synced 2025-01-14 04:47:27 -08:00
parent
211a6dea9f
commit
6fdc6773f8
2 changed files with 3 additions and 4 deletions
|
@ -15,7 +15,6 @@ multipart = ["reqwest/multipart"]
|
||||||
json = ["reqwest/json"]
|
json = ["reqwest/json"]
|
||||||
charset = ["reqwest/charset"]
|
charset = ["reqwest/charset"]
|
||||||
http2 = ["reqwest/http2"]
|
http2 = ["reqwest/http2"]
|
||||||
rustls-tls = ["reqwest/rustls-tls"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.0"
|
anyhow = "1.0.0"
|
||||||
|
|
|
@ -71,7 +71,7 @@ pub struct RetryTransientMiddleware<
|
||||||
retry_policy: T,
|
retry_policy: T,
|
||||||
retryable_strategy: R,
|
retryable_strategy: R,
|
||||||
#[cfg(feature = "tracing")]
|
#[cfg(feature = "tracing")]
|
||||||
retry_log_level: tracing::Level,
|
retry_log_level: ::tracing::Level,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: RetryPolicy + Send + Sync> RetryTransientMiddleware<T, DefaultRetryableStrategy> {
|
impl<T: RetryPolicy + Send + Sync> RetryTransientMiddleware<T, DefaultRetryableStrategy> {
|
||||||
|
@ -83,7 +83,7 @@ impl<T: RetryPolicy + Send + Sync> RetryTransientMiddleware<T, DefaultRetryableS
|
||||||
/// Set the log [level][tracing::Level] for retry events.
|
/// Set the log [level][tracing::Level] for retry events.
|
||||||
/// The default is [`WARN`][tracing::Level::WARN].
|
/// The default is [`WARN`][tracing::Level::WARN].
|
||||||
#[cfg(feature = "tracing")]
|
#[cfg(feature = "tracing")]
|
||||||
pub fn with_retry_log_level(mut self, level: tracing::Level) -> Self {
|
pub fn with_retry_log_level(mut self, level: ::tracing::Level) -> Self {
|
||||||
self.retry_log_level = level;
|
self.retry_log_level = level;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ where
|
||||||
retry_policy,
|
retry_policy,
|
||||||
retryable_strategy,
|
retryable_strategy,
|
||||||
#[cfg(feature = "tracing")]
|
#[cfg(feature = "tracing")]
|
||||||
retry_log_level: tracing::Level::WARN,
|
retry_log_level: ::tracing::Level::WARN,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue