pub struct ErrorReporter { /* private fields */ }Expand description
Error reporter for structured error logging and reporting
Implementations§
Source§impl ErrorReporter
impl ErrorReporter
Sourcepub fn with_max_logs(max_logs: usize) -> Self
pub fn with_max_logs(max_logs: usize) -> Self
Creates a new error reporter with custom max logs
Sourcepub async fn report_error(&self, error: &Error, context: Option<ErrorContext>)
pub async fn report_error(&self, error: &Error, context: Option<ErrorContext>)
Reports an error with context
Sourcepub async fn report_error_with_retry(
&self,
error: &Error,
context: Option<ErrorContext>,
retry_count: u32,
)
pub async fn report_error_with_retry( &self, error: &Error, context: Option<ErrorContext>, retry_count: u32, )
Reports an error with retry count
Sourcepub async fn get_logs(&self) -> Vec<ErrorLogEntry>
pub async fn get_logs(&self) -> Vec<ErrorLogEntry>
Gets all error logs
Sourcepub async fn get_logs_by_type(&self, error_type: &str) -> Vec<ErrorLogEntry>
pub async fn get_logs_by_type(&self, error_type: &str) -> Vec<ErrorLogEntry>
Gets error logs filtered by error type
Sourcepub async fn get_logs_by_tool(&self, tool_id: &str) -> Vec<ErrorLogEntry>
pub async fn get_logs_by_tool(&self, tool_id: &str) -> Vec<ErrorLogEntry>
Gets error logs filtered by tool ID
Sourcepub async fn get_logs_by_server(&self, server_id: &str) -> Vec<ErrorLogEntry>
pub async fn get_logs_by_server(&self, server_id: &str) -> Vec<ErrorLogEntry>
Gets error logs filtered by server ID
Sourcepub async fn clear_logs(&self)
pub async fn clear_logs(&self)
Clears all error logs
Sourcepub async fn get_statistics(&self) -> ErrorStatistics
pub async fn get_statistics(&self) -> ErrorStatistics
Gets error statistics
Trait Implementations§
Source§impl Clone for ErrorReporter
impl Clone for ErrorReporter
Source§fn clone(&self) -> ErrorReporter
fn clone(&self) -> ErrorReporter
Returns a duplicate 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 ErrorReporter
impl Debug for ErrorReporter
Auto Trait Implementations§
impl Freeze for ErrorReporter
impl !RefUnwindSafe for ErrorReporter
impl Send for ErrorReporter
impl Sync for ErrorReporter
impl Unpin for ErrorReporter
impl !UnwindSafe for ErrorReporter
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