Provides a configurable logger with level filtering, redaction, and sink wiring for Node/TS projects.
// Source: https://github.com/istefox/obsidian-mcp-connector | License: MIT | Copyright 2026 Stefano Ferri
// Provided via justclaw.it.com; keep this notice with the code.
/**
* The logger: level filter, redaction and sink wiring (ADR-0029 D1-D3, D6,
* D7).
*
* Until `configure()` the logger touches no file system: it holds at most
* `PENDING_ENTRY_LIMIT` raw entries, the oldest dropped first, and formats
* them at configuration time so path redaction reaches them too. `close()`
* drains the sink, detaches it and discards anything held, which returns
* the logger to its unconfigured state.
*
* `debug`, `info`, `warn` and `error` are synchronous and never throw.
*
* Frozen messages:
* "diagnostic log resumed" WARN { droppedLines }
* "diagnostic log cleared"
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key