pub struct LogFrame {
pub v: u8,
pub ts_us: i64,
pub source: String,
pub level: Level,
pub target: Option<String>,
pub msg: String,
pub fields: Fields,
}Expand description
One log record from any producer (Rust service, Python agent, subprocess
tap). The src is the emitting process or component; tgt is the module or
logger target. Structured fields ride in the open f map.
Fields§
§v: u8Wire version.
ts_us: i64Microsecond epoch timestamp.
source: StringEmitting process or component (e.g. the daemon name).
level: LevelSeverity level.
target: Option<String>Module or logger target.
msg: StringThe rendered message.
fields: FieldsOpen structured-fields map.
Implementations§
Source§impl LogFrame
impl LogFrame
Sourcepub fn new(
ts_us: i64,
source: impl Into<String>,
level: Level,
msg: impl Into<String>,
) -> Self
pub fn new( ts_us: i64, source: impl Into<String>, level: Level, msg: impl Into<String>, ) -> Self
Build a record stamped with the current wire version.
Sourcepub fn redact_fields(&mut self) -> bool
pub fn redact_fields(&mut self) -> bool
Redact every secret-bearing field in place (idempotent). Returns true
if any field value was changed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogFrame
impl<'de> Deserialize<'de> for LogFrame
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
impl StructuralPartialEq for LogFrame
Auto Trait Implementations§
impl Freeze for LogFrame
impl RefUnwindSafe for LogFrame
impl Send for LogFrame
impl Sync for LogFrame
impl Unpin for LogFrame
impl UnsafeUnpin for LogFrame
impl UnwindSafe for LogFrame
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