pub struct DiagnosticLog<E: DiagnosticRecord> { /* private fields */ }Expand description
Bounded in-memory diagnostic log with optional stderr mirroring.
Generic over the entry type E so different subsystems can use
their own entry structs while sharing the log infrastructure.
Implementations§
Source§impl<E: DiagnosticRecord> DiagnosticLog<E>
impl<E: DiagnosticRecord> DiagnosticLog<E>
Sourcepub fn with_stderr(self) -> Self
pub fn with_stderr(self) -> Self
Enable stderr mirroring — each recorded entry is also written to stderr as a JSONL line.
Sourcepub fn with_max_entries(self, max: usize) -> Self
pub fn with_max_entries(self, max: usize) -> Self
Set the maximum number of entries to keep. When the log is full,
the oldest entry is evicted. Pass 0 for unlimited.
Trait Implementations§
Source§impl<E: Debug + DiagnosticRecord> Debug for DiagnosticLog<E>
impl<E: Debug + DiagnosticRecord> Debug for DiagnosticLog<E>
Source§impl<E: DiagnosticRecord> Default for DiagnosticLog<E>
impl<E: DiagnosticRecord> Default for DiagnosticLog<E>
Auto Trait Implementations§
impl<E> Freeze for DiagnosticLog<E>
impl<E> RefUnwindSafe for DiagnosticLog<E>where
E: RefUnwindSafe,
impl<E> Send for DiagnosticLog<E>where
E: Send,
impl<E> Sync for DiagnosticLog<E>where
E: Sync,
impl<E> Unpin for DiagnosticLog<E>where
E: Unpin,
impl<E> UnsafeUnpin for DiagnosticLog<E>
impl<E> UnwindSafe for DiagnosticLog<E>where
E: UnwindSafe,
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