Skip to content

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.

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): retains event, which must be recognized by std:logging/LogEvent, after every event retained before it, and answers null. 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.

Exact module source · Standard-library API · Standard library overview