Expand description
Safe structured operational logging for AppCore.
Events are filtered before formatting, sanitized before every ordinary sink,
and retained only under explicit count and byte limits. Severity describes
impact; Verbosity describes detail and is independent of sensitivity.
Sensitive policy output is accepted only by SensitiveDntSink, which
writes an authenticated encrypted DNT envelope and never falls back to text.
Structs§
- Async
Sink - Opt-in non-blocking wrapper around one sink.
- Async
Sink Config - Count and retained-byte ceilings for one asynchronous sink.
- Async
Sink Stats - Lock-free observation of one asynchronous sink.
- Configured
Logger - Logger assembled from
LoggerConfig, including optional crash retention. - Console
Sink - Human-oriented stdout sink, with no terminal-color assumptions.
- File
Archive Config - Bounded archive configuration for rotated JSONL files.
- File
Sink - Synchronous bounded JSONL sink; callers choose it only outside hot paths.
- File
Sink Config - Bounded structured JSONL file configuration.
- Fixed
LogClock - Deterministic clock for tests and reproducible examples.
- LogBuilder
- Fluent, component-scoped log emitter with an immutable per-event override.
- LogDispatcher
- Thread-safe fan-out dispatcher; ordinary sinks receive only sanitized events.
- LogEvent
- Structured operational event passed through the sanitizer before normal sinks.
- LogField
- One structured field; paths must be supplied as fields instead of embedded text.
- LogPolicy
- Filters events before formatting and sanitizes values before ordinary sinks.
- LogStats
- Observable dispatcher counters; sink failures never recursively log.
- Logger
Config - Complete explicit logger configuration.
- Path
Aliases - Explicit local path aliases used by typed path fields.
- Ring
Buffer Sink - In-memory bounded diagnostic sink.
- Sensitive
DntSink - Encrypted DNT sink. It has no plaintext fallback and must be explicitly wired.
- Sensitive
DntSink Config - Explicit encrypted sensitive-output configuration.
- Sink
Stats - Failure counter for one configured sink label.
- System
LogClock - Production wall-clock implementation with a controlled pre-epoch fallback.
- Verbosity
- Detail threshold from V1 (critical) through V9 (deep diagnostics).
- Verbosity
Error - Invalid public verbosity outside the V1–V9 contract.
Enums§
- LogConfig
Error - Invalid high-level logger configuration.
- LogError
- Logging sink error with no sensitive source text.
- LogEvent
Error - Event rejected before sanitization or sink delivery.
- LogOutput
Mode - Explicit destinations for ordinary operational logs.
- Sensitivity
- Explicit information-handling policy, never inferred from verbosity.
- Severity
- Operational impact of an event.
Constants§
- LOG_
SIZE_ 1_ MIB - One mebibyte, suitable for small local or short-lived logs.
- LOG_
SIZE_ 2_ MIB - Two mebibytes, suitable for small application crash logs.
- LOG_
SIZE_ 4_ MIB - Four mebibytes, suitable for modest local application logs.
- LOG_
SIZE_ 8_ MIB - Eight mebibytes, suitable for normal rotating application logs.
- LOG_
SIZE_ 16_ MIB - Sixteen mebibytes, suitable for moderate operational logs.
- LOG_
SIZE_ 32_ MIB - Thirty-two mebibytes, suitable for busier bounded services.
- LOG_
SIZE_ 64_ MIB - Sixty-four mebibytes, suitable for high-volume bounded services.
- MAX_
ASYNC_ LOG_ BYTES - Maximum estimated retained bytes accepted by one asynchronous sink.
- MAX_
ASYNC_ LOG_ EVENTS - Maximum events accepted by one asynchronous sink configuration.
- MAX_
LOG_ FIELDS - Maximum structured fields attached to one event.
- MAX_
LOG_ FIELD_ KEY_ BYTES - Maximum UTF-8 bytes retained in one structured field key.
- MAX_
LOG_ FIELD_ VALUE_ BYTES - Maximum UTF-8 bytes retained in one structured field value.
- MAX_
LOG_ TEXT_ BYTES - Maximum UTF-8 bytes retained in one message or identity-like field.
Traits§
- LogClock
- Supplies Unix timestamps in milliseconds at an application boundary.
- LogSink
- A destination receiving a sanitized event from
crate::LogDispatcher.