pub struct LogSnapshot {
pub timestamp: u64,
pub level: Level,
pub target: String,
pub file: Option<String>,
pub line: Option<u32>,
pub message: String,
}Expand description
An owned, Send + 'static snapshot of a single log record.
log::Record borrows its fields and is neither Send nor 'static, so a
sink that wants to process records off-thread must copy what it needs
synchronously. This struct uses only types available to reduct_base
(log::Level is from the log crate), keeping the hook fully decoupled from
any consumer.
Fields§
§timestamp: u64Microseconds since the Unix epoch, captured when the record was logged.
level: Level§target: String§file: Option<String>§line: Option<u32>§message: StringTrait Implementations§
Source§impl Clone for LogSnapshot
impl Clone for LogSnapshot
Source§impl Debug for LogSnapshot
impl Debug for LogSnapshot
Auto Trait Implementations§
impl Freeze for LogSnapshot
impl RefUnwindSafe for LogSnapshot
impl Send for LogSnapshot
impl Sync for LogSnapshot
impl Unpin for LogSnapshot
impl UnsafeUnpin for LogSnapshot
impl UnwindSafe for LogSnapshot
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