Struct SentryLogger
pub struct SentryLogger<L>where
L: Log,{ /* private fields */ }Expand description
Provides a dispatching logger.
Implementations§
§impl SentryLogger<NoopLogger>
impl SentryLogger<NoopLogger>
pub fn new() -> SentryLogger<NoopLogger>
pub fn new() -> SentryLogger<NoopLogger>
Create a new SentryLogger with a [NoopLogger] as destination.
§impl<L> SentryLogger<L>where
L: Log,
impl<L> SentryLogger<L>where
L: Log,
pub fn with_dest(dest: L) -> SentryLogger<L>
pub fn with_dest(dest: L) -> SentryLogger<L>
Create a new SentryLogger wrapping a destination log::Log.
pub fn filter<F>(self, filter: F) -> SentryLogger<L>
pub fn filter<F>(self, filter: F) -> SentryLogger<L>
Sets a custom filter function.
The filter classifies how sentry should handle Records based on
their log::Metadata.
pub fn mapper<M, T>(self, mapper: M) -> SentryLogger<L>
pub fn mapper<M, T>(self, mapper: M) -> SentryLogger<L>
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§
§impl Default for SentryLogger<NoopLogger>
impl Default for SentryLogger<NoopLogger>
§fn default() -> SentryLogger<NoopLogger>
fn default() -> SentryLogger<NoopLogger>
Returns the “default value” for a type. Read more
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> UnsafeUnpin for SentryLogger<L>where
L: UnsafeUnpin,
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