pub struct Event<'a> {
pub timestamp: DateTime<Utc>,
pub log_level: &'static str,
pub message: String,
pub ecs_version: &'static str,
pub log_origin: LogOrigin<'a>,
}
Expand description
Representation of an event compatible with ECS logging.
The event follows ECS Logging spec.
Fields§
§timestamp: DateTime<Utc>
Date and time when the message is logged.
Mapped to @timestamp
field.
log_level: &'static str
The verbosity level of the message.
Mapped to log.level
field.
message: String
The message body.
Mapped to message
field.
ecs_version: &'static str
ECS version this event conforms to.
Mapped to ecs.version
field.
log_origin: LogOrigin<'a>
Information about the source code which logged the message.
Mapped to log.origin
field.
Implementations§
Trait Implementations§
impl<'a> Eq for Event<'a>
impl<'a> StructuralPartialEq for Event<'a>
Auto Trait Implementations§
impl<'a> Freeze for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnwindSafe for Event<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.