RingBufferOutput class

In-memory circular buffer that keeps the last N log records.

Useful for: history queries, crash reports, in-app log viewer.

Inheritance

Constructors

RingBufferOutput({int maxEntries = 1000, String? scopeFilter})
Creates a RingBufferOutput with optional capacity and scope filter.

Properties

entries List<LogRecord>
All buffered entries in chronological order.
no setter
hashCode int
The hash code for this object.
no setterinherited
isAsync bool
Whether this output uses async writing.
no setterinherited
length int
Current number of entries in the buffer.
no setter
maxEntries int
Maximum number of records to keep in the buffer.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopeFilter String?
Optional scope filter. If non-null, this output only receives records whose scope starts with this prefix.
final

Methods

clear() → void
Clear all buffered entries.
dispose() → void
Clean up resources.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(LogFilter filter, {int? limit}) List<LogRecord>
Query entries matching filter, returning at most limit results.
toString() String
A string representation of this object.
inherited
write(LogRecord record) → void
Write a log record synchronously.
override
writeAsync(LogRecord record) Future<void>
Write a log record asynchronously.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited