std:logging/MemorySink
std:logging/MemorySink
Section titled “std:logging/MemorySink”Canonical occurrence:
protos/lib/logging/MemorySink.protos· Protos revision:e99b712ecf658a527b1fe82c8beba2c1286d8dc9.
In-memory sinks that retain emitted events, mainly for tests and for programs that inspect their own log output. A memory sink keeps the exact emitted events: it neither copies nor formats them, and it has no capacity limit, eviction, or clearing operation.
Observable top-level slots
Section titled “Observable top-level slots”This page lists the complete mechanically observable top-level slot inventory required by D067. Authored documentation, when present, is canonical D062 prose; mechanical presence alone does not create a stability or compatibility promise.
Answers a fresh frozen sink with no retained events.
The sink answers:
emit(event): retainsevent, which must be recognized bystd:logging/LogEvent, after every event retained before it, and answersnull. Any other argument signals an Error and retains nothing.events(): a fresh frozen Array of the retained events in emission order. Each call answers a new Array; later emissions do not change an Array already answered.
Mechanical facts
Section titled “Mechanical facts”-
Fixed parameters: none
-
Rest parameter: none
-
Source occurrence:
protos/lib/logging/MemorySink.protos:31 -
Exact source page: open in the source browser
Exact module source · Standard-library API · Standard library overview