pub struct RequestResponseLogger {
pub log_requests: bool,
pub log_responses: bool,
pub max_payload_size: usize,
}Expand description
Request/response logger for Bitcoin operations
Fields§
§log_requests: boolWhether to log request details
log_responses: boolWhether to log response details
max_payload_size: usizeMaximum size of logged payloads (in bytes)
Implementations§
Source§impl RequestResponseLogger
impl RequestResponseLogger
Sourcepub fn with_requests(self, enabled: bool) -> Self
pub fn with_requests(self, enabled: bool) -> Self
Configure request logging
Sourcepub fn with_responses(self, enabled: bool) -> Self
pub fn with_responses(self, enabled: bool) -> Self
Configure response logging
Sourcepub fn with_max_payload_size(self, size: usize) -> Self
pub fn with_max_payload_size(self, size: usize) -> Self
Configure maximum payload size to log
Sourcepub fn log_request(&self, context: &RpcLogContext, method: &str, params: &str)
pub fn log_request(&self, context: &RpcLogContext, method: &str, params: &str)
Log a request
Sourcepub fn log_response(
&self,
context: &RpcLogContext,
success: bool,
response_data: &str,
)
pub fn log_response( &self, context: &RpcLogContext, success: bool, response_data: &str, )
Log a response
Trait Implementations§
Source§impl Debug for RequestResponseLogger
impl Debug for RequestResponseLogger
Auto Trait Implementations§
impl Freeze for RequestResponseLogger
impl RefUnwindSafe for RequestResponseLogger
impl Send for RequestResponseLogger
impl Sync for RequestResponseLogger
impl Unpin for RequestResponseLogger
impl UnwindSafe for RequestResponseLogger
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