Skip to main content

push_log_entry

Function push_log_entry 

Source
pub fn push_log_entry(
    recent_log: &Arc<RwLock<VecDeque<LogEntry>>>,
    message: String,
)
Expand description

Push a log entry to the ring buffer, enforcing the 256-entry capacity bound.

Uses try_write() with a silent drop on contention to avoid deadlocks during error-handling paths that may already hold the lock.