pub struct Log {
pub level: LogLevel,
pub body: String,
pub trace_id: Option<TraceId>,
pub timestamp: SystemTime,
pub severity_number: Option<LogSeverityNumber>,
pub attributes: BTreeMap<String, LogAttribute>,
}
Expand description
A single structured log.
Fields§
§level: LogLevel
The severity of the log (required).
body: String
The log body/message (required).
trace_id: Option<TraceId>
The ID of the Trace in which this log happened (required).
timestamp: SystemTime
The timestamp of the log (required).
severity_number: Option<LogSeverityNumber>
The severity number of the log.
attributes: BTreeMap<String, LogAttribute>
Additional arbitrary attributes attached to the log.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Log
impl<'de> Deserialize<'de> for Log
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Log, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Log, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Log
impl Serialize for Log
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Log
Auto Trait Implementations§
impl Freeze for Log
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnwindSafe for Log
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