pub struct AdvLogEntry {
pub raw: String,
pub message: String,
pub level: LogLevel,
pub timestamp: Option<String>,
pub timestamp_value: Option<i64>,
pub source: Option<String>,
pub line_number: usize,
pub bookmarked: bool,
pub json_fields: Option<Vec<(String, String)>>,
pub expanded: bool,
}Expand description
A parsed log entry
Fields§
§raw: StringOriginal raw line
message: StringParsed message content
level: LogLevelDetected log level
timestamp: Option<String>Parsed timestamp string
timestamp_value: Option<i64>Timestamp as sortable value (for jump-to-time)
source: Option<String>Source/logger name
line_number: usizeLine number in original source
bookmarked: boolIs this line bookmarked
json_fields: Option<Vec<(String, String)>>Parsed JSON fields (if JSON log)
expanded: boolIs expanded to show full details
Implementations§
Source§impl LogEntry
impl LogEntry
Sourcepub fn new(raw: impl Into<String>, line_number: usize) -> Self
pub fn new(raw: impl Into<String>, line_number: usize) -> Self
Create a new log entry from raw text
Sourcepub fn timestamp_value(self, value: i64) -> Self
pub fn timestamp_value(self, value: i64) -> Self
Set timestamp value for sorting
Sourcepub fn json_fields(self, fields: Vec<(String, String)>) -> Self
pub fn json_fields(self, fields: Vec<(String, String)>) -> Self
Set JSON fields
Sourcepub fn toggle_bookmark(&mut self)
pub fn toggle_bookmark(&mut self)
Toggle bookmark status
Sourcepub fn toggle_expanded(&mut self)
pub fn toggle_expanded(&mut self)
Toggle expanded state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogEntry
impl RefUnwindSafe for LogEntry
impl Send for LogEntry
impl Sync for LogEntry
impl Unpin for LogEntry
impl UnwindSafe for LogEntry
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more