pub struct RequestLogger {}Expand description
Basic request logger policy.
This policy logs the request and response at info level using the tracing crate.
If the request fails, it logs the error at error level.
To use the policy, add it to the client builder:
let git_client = git::ClientBuilder::new(credential)
.per_call_policies(vec![telemetry::request_logger_policy()])
.build();Trait Implementations§
Source§impl Clone for RequestLogger
impl Clone for RequestLogger
Source§fn clone(&self) -> RequestLogger
fn clone(&self) -> RequestLogger
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestLogger
impl Debug for RequestLogger
Source§impl Default for RequestLogger
impl Default for RequestLogger
Source§fn default() -> RequestLogger
fn default() -> RequestLogger
Returns the “default value” for a type. Read more
Source§impl PartialEq for RequestLogger
impl PartialEq for RequestLogger
Source§impl Policy for RequestLogger
impl Policy for RequestLogger
fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'_>,
request: &'life2 mut Request,
next: &'life3 [Arc<dyn Policy>],
) -> Pin<Box<dyn Future<Output = PolicyResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
impl Eq for RequestLogger
impl StructuralPartialEq for RequestLogger
Auto Trait Implementations§
impl Freeze for RequestLogger
impl RefUnwindSafe for RequestLogger
impl Send for RequestLogger
impl Sync for RequestLogger
impl Unpin for RequestLogger
impl UnwindSafe for RequestLogger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more