feat(error-log): bounded in-memory WARN/ERROR ring buffer (VS-7) #19
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/error-log-buffer-vs-7"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replaces the empty
ServerErrorsreply with a real ring-buffer-backed list of recent WARN / ERROR tracing events.Changes
crates/meshcentral-web/src/error_buffer.rs(1024-entry bounded VecDeque +tracing_subscriber::Layercapture).ServerErrorsreadsstate.error_buffer.snapshot()and renders one line per entry;ServerClearErrorLogclears the ring.ServerConfiggrows an optionalerror_bufferso the binary can pass the same buffer the tracing layer writes to.meshcentral/src/main.rs::init_tracingswitches fromfmt().init()to a layered Registry that combines the env filter, the fmt layer (stderr), and the error-buffer layer.Test plan
cargo test -p meshcentral-web --lib error_buffer(4/4 passing).cargo check --workspaceclean.Closes VS-7.