MemoryRingBufferSink class
In-memory ring buffer sink holding a fixed maximum capacity of recent logs.
Prevents out-of-memory growth by automatically evicting oldest logs when maxCapacity is reached.
- Implemented types
Constructors
- MemoryRingBufferSink({int maxCapacity = 100})
- Creates a MemoryRingBufferSink.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
logs
→ List<
ZenithLogEvent> -
Unmodifiable view of currently retained log events (oldest first).
no setter
- maxCapacity → int
-
Maximum number of log events retained in RAM.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Clears all retained log events.
-
emit(
ZenithLogEvent event) → void -
Emits a structured ZenithLogEvent to this sink.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited