pub struct LogManager { /* private fields */ }Expand description
Global structured log manager.
The manager owns the in-memory history/live stream, forwards every accepted
entry to the registered LogProvider, and finally mirrors the entry to the
native platform logger supplied by the host crate.
Implementations§
Source§impl LogManager
impl LogManager
Sourcepub fn subscribe(&self) -> Receiver<LogMessage>
pub fn subscribe(&self) -> Receiver<LogMessage>
Subscribe to the live log stream.
Sourcepub fn attach(&self, recent_limit: usize) -> AttachedLogStream
pub fn attach(&self, recent_limit: usize) -> AttachedLogStream
Atomically attach a log stream with a recent replay window.
The returned recent snapshot and receiver are stitched together under the
history lock so callers do not see gaps between the replay window and live events.
Sourcepub fn attach_default(&self) -> AttachedLogStream
pub fn attach_default(&self) -> AttachedLogStream
Attach a log stream with the SDK’s default replay window.
Sourcepub fn print_to_native(&self, message: &LogMessage)
pub fn print_to_native(&self, message: &LogMessage)
Print a log message to the native logger.
Sourcepub fn snapshot_recent(&self, limit: usize) -> Vec<LogMessage>
pub fn snapshot_recent(&self, limit: usize) -> Vec<LogMessage>
Snapshot recent logs from the in-memory ring buffer.
Sourcepub fn collect_archive(&self, limit: usize) -> Result<CollectedLogArchive>
pub fn collect_archive(&self, limit: usize) -> Result<CollectedLogArchive>
Build a compressed JSONL archive of recent logs.
Auto Trait Implementations§
impl !Freeze for LogManager
impl !RefUnwindSafe for LogManager
impl Send for LogManager
impl Sync for LogManager
impl Unpin for LogManager
impl UnsafeUnpin for LogManager
impl !UnwindSafe for LogManager
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