[−][src]Struct ll::Event
Underlying struct for the event. This struct is only interacted with publicly
after the logging is done. This struct is what gets passed to every Drain
implementation.
Fields
name: String
Name of the event, which is its main identifier
data: EventData
Any data associated with the event in the shape of simple key/value pairs
discarded: bool
Whether this event has been logged or discarded already
duration: Option<Duration>
how long it took to run the block of code that was wrapped into logger event call.
error_msg: Option<String>
Error message that was a result of running a code block wrapped in a logging call. Must be set manually.
is_error: bool
Whether it's an error or not.
level: Level
Logging level of this event. If event is Trace
and the logger is
set up to log only Info
, the event won't be logged
started_at: SystemTime
SystemTime of when the event was created
Tags provided in the event name string
for example
l.event("my_event #dontprint", |_| { ... });
will have tags as BTreeSet<"dontprint">
logger: Arc<Logger>
Reference to the logger that spawned this event so we can have nested events started from an Event.
Auto Trait Implementations
impl !RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,