[][src]Struct ll::Event

pub struct Event {
    pub name: String,
    pub data: EventData,
    pub discarded: bool,
    pub duration: Option<Duration>,
    pub error_msg: Option<String>,
    pub is_error: bool,
    pub level: Level,
    pub started_at: SystemTime,
    pub tags: BTreeSet<String>,
    pub logger: Arc<Logger>,
}

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: BTreeSet<String>

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.