InMemoryLogBuffer(
self,
capacity: int = DEFAULT_CAPACITY,
)logging.Handler| Name | Type | Description |
|---|---|---|
capacity | int | Default: DEFAULT_CAPACITYMaximum records to retain per level; oldest are dropped first. |
| Name | Type |
|---|---|
| capacity | int |
Logging handler retaining the most recent structured records in memory.
Retention is partitioned by level: each recognized level name (see
LOG_LEVELS) keeps its own bounded deque of capacity records, while
unrecognized names share the _FALLBACK_LEVEL_BUCKET deque. A burst of
high-volume records at one recognized level (typically DEBUG) therefore
cannot evict the rarer, higher-severity records at other recognized levels,
so the Debug Console's level filter can still surface them. Each retained
record is tagged with its monotonic emission sequence number so snapshots
stay chronologically ordered across levels.