pub struct LogItem {
pub time: Value,
pub level: Level,
pub message: String,
pub target: String,
pub fields: Map<String, Value>,
pub span: Map<String, Value>,
pub filename: Option<String>,
pub line_number: Option<i64>,
}Available on crate feature
logger only.Expand description
One structured log entry, handed to the writers (and filter/transformer).
Fields§
§time: ValueTimestamp: microseconds since epoch (JSON output) or formatted string
(color output). Overridable through the reserved _time field.
level: Level§message: String§target: String§fields: Map<String, Value>Extra key-value pairs attached to the event (log.* fields are internal).
span: Map<String, Value>Key-value pairs of the current span (http.*/otel.*/name are internal).
filename: Option<String>§line_number: Option<i64>Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogItem
impl<'de> Deserialize<'de> for LogItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LogItem
impl RefUnwindSafe for LogItem
impl Send for LogItem
impl Sync for LogItem
impl Unpin for LogItem
impl UnsafeUnpin for LogItem
impl UnwindSafe for LogItem
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