pub struct SentryLogger<L: Log> { /* private fields */ }Expand description
Provides a dispatching logger.
Implementations§
Source§impl SentryLogger<NoopLogger>
impl SentryLogger<NoopLogger>
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new SentryLogger with a NoopLogger as destination.
Source§impl<L: Log> SentryLogger<L>
impl<L: Log> SentryLogger<L>
Sourcepub fn filter<F>(self, filter: F) -> Self
pub fn filter<F>(self, filter: F) -> Self
Sets a custom filter function.
The filter classifies how sentry should handle Records based on
their log::Metadata.
Sourcepub fn mapper<M, T>(self, mapper: M) -> Self
pub fn mapper<M, T>(self, mapper: M) -> Self
Sets a custom mapper function.
The mapper is responsible for creating either breadcrumbs or events
from Records. It can return either a single RecordMapping or
a Vec<RecordMapping> to send multiple items to Sentry from one log record.
Trait Implementations§
Source§impl Default for SentryLogger<NoopLogger>
impl Default for SentryLogger<NoopLogger>
Source§impl<L: Log> Log for SentryLogger<L>
impl<L: Log> Log for SentryLogger<L>
Auto Trait Implementations§
impl<L> Freeze for SentryLogger<L>where
L: Freeze,
impl<L> !RefUnwindSafe for SentryLogger<L>
impl<L> Send for SentryLogger<L>
impl<L> Sync for SentryLogger<L>
impl<L> Unpin for SentryLogger<L>where
L: Unpin,
impl<L> !UnwindSafe for SentryLogger<L>
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