pub struct LogMetrics { /* private fields */ }Expand description
Logging metrics collector
Implementations§
Source§impl LogMetrics
impl LogMetrics
Sourcepub fn record_log(&mut self, level: &str, category: Option<&str>, bytes: usize)
pub fn record_log(&mut self, level: &str, category: Option<&str>, bytes: usize)
Record a new log entry
Sourcepub fn record_error(&mut self)
pub fn record_error(&mut self)
Record an error
Sourcepub fn record_rate_limited(&mut self)
pub fn record_rate_limited(&mut self)
Record rate limited event
Sourcepub fn record_redaction(&mut self)
pub fn record_redaction(&mut self)
Record redacted log
Sourcepub fn record_encryption(&mut self)
pub fn record_encryption(&mut self)
Record encrypted log
Sourcepub fn update_rate(&mut self, rate: u64)
pub fn update_rate(&mut self, rate: u64)
Update current rate
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Get snapshot of current metrics
Trait Implementations§
Source§impl Clone for LogMetrics
impl Clone for LogMetrics
Source§fn clone(&self) -> LogMetrics
fn clone(&self) -> LogMetrics
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 LogMetrics
impl Debug for LogMetrics
Auto Trait Implementations§
impl Freeze for LogMetrics
impl RefUnwindSafe for LogMetrics
impl Send for LogMetrics
impl Sync for LogMetrics
impl Unpin for LogMetrics
impl UnwindSafe for LogMetrics
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