pub struct LogEntry {
pub ts: i64,
pub level: String,
pub source: String,
pub message: String,
}Expand description
A single log entry captured from a running session.
Entries are produced by Lua print(), alc.log(), and engine-internal
events, then accumulated in a per-session ring buffer (cap=20) for
lightweight observability via alc_status.
§Fields
ts— Unix milliseconds (i64) when the entry was recorded.level— Severity string:"info","warn","error","debug", etc.source— Originator:"alc.lua.print","alc.log","engine", etc.message— Human-readable log text.
Fields§
§ts: i64Unix milliseconds timestamp of when the entry was recorded.
level: StringSeverity level string (e.g. “info”, “warn”, “error”, “debug”).
source: StringOriginator identifier (e.g. “alc.lua.print”, “alc.log”, “engine”).
message: StringHuman-readable log message.
Implementations§
Source§impl LogEntry
impl LogEntry
Sourcepub fn new(
level: impl Into<String>,
source: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn new( level: impl Into<String>, source: impl Into<String>, message: impl Into<String>, ) -> Self
Create a new LogEntry with the current wall-clock timestamp.
§Arguments
level— Severity label string.source— Originator identifier string.message— Log message text.
§Returns
A new LogEntry with ts set to the current Unix millisecond
timestamp. If SystemTime is before the Unix epoch (broken wall
clock), ts is saturated to 0.
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 UnsafeUnpin 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