pub struct LogStore { /* private fields */ }Expand description
Thread-safe log store managing separate ring buffers for each entry type.
Used by the bridge to respond to CLI queries and by middleware/capture layers to push new entries.
Implementations§
Source§impl LogStore
impl LogStore
Sourcepub fn new(session: SessionInfo) -> Self
pub fn new(session: SessionInfo) -> Self
Create a new store with default buffer capacities.
Sourcepub fn push(&self, entry: LogEntry)
pub fn push(&self, entry: LogEntry)
Push a log entry into the appropriate buffer.
Assigns an ID if the entry does not already have one.
Sourcepub fn push_console(&self, level: &str, args: Vec<Value>, source: &str)
pub fn push_console(&self, level: &str, args: Vec<Value>, source: &str)
Push a console entry directly (convenience for middleware/capture).
Sourcepub fn push_error(&self, message: &str, stack: Option<String>, source: &str)
pub fn push_error(&self, message: &str, stack: Option<String>, source: &str)
Push an error entry directly (convenience for middleware/capture).
Sourcepub fn push_network(&self, entry: NetworkEntry)
pub fn push_network(&self, entry: NetworkEntry)
Push a network entry directly (convenience for middleware).
Sourcepub fn session(&self) -> &SessionInfo
pub fn session(&self) -> &SessionInfo
Return the session info.
Sourcepub fn query(&self, command: &str, filters: &Filters) -> QueryResponse
pub fn query(&self, command: &str, filters: &Filters) -> QueryResponse
Execute a query command with optional filters and return a response.
Auto Trait Implementations§
impl !Freeze for LogStore
impl RefUnwindSafe for LogStore
impl Send for LogStore
impl Sync for LogStore
impl Unpin for LogStore
impl UnsafeUnpin for LogStore
impl UnwindSafe for LogStore
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