pub struct LoggingBackend { /* private fields */ }Expand description
Logging-based telemetry backend.
Routes metrics through the project’s logger implementation.
Implementations§
Source§impl LoggingBackend
impl LoggingBackend
Sourcepub fn with_logger(
warn_threshold_bytes: usize,
logger: Rc<dyn Loggable>,
) -> Self
pub fn with_logger( warn_threshold_bytes: usize, logger: Rc<dyn Loggable>, ) -> Self
Create a logging backend that writes via the provided logger.
Trait Implementations§
Source§impl TelemetryBackend for LoggingBackend
impl TelemetryBackend for LoggingBackend
Source§fn emit_snapshot(&self, snapshot: &MemorySnapshot)
fn emit_snapshot(&self, snapshot: &MemorySnapshot)
Emit a memory snapshot to the telemetry system.
Source§fn emit_warning(&self, message: &str)
fn emit_warning(&self, message: &str)
Emit a warning when memory usage approaches threshold.
Auto Trait Implementations§
impl Freeze for LoggingBackend
impl !RefUnwindSafe for LoggingBackend
impl !Send for LoggingBackend
impl !Sync for LoggingBackend
impl Unpin for LoggingBackend
impl UnsafeUnpin for LoggingBackend
impl !UnwindSafe for LoggingBackend
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more