# v4.0.0 ## Breaking changes - Winston and `winston-transport` are optional peers. Winston consumers must install both as production dependencies. Pino-only consumers install `ntlogger` and `pino` and import `ntlogger/pino`. - Pino 9.14.0 or newer is required. Node.js 22.22.2 or newer remains required. - Winston now applies default secret redaction. Review custom redaction settings and output expectations. - Pino log calls after close now throw, including disabled levels, extracted methods, and descendants. Closing a child leaves its parent open. Pino close returns a drain result; Winston rejects drain failures. ## Integration features - `createPinoOptions()` supplies Fastify-compatible options without changing route logger types. - Pino detects `NODE_TEST_CONTEXT` for automatic test silence; `createTestLogger()` captures structured records. - Optional `onLog` callbacks receive detached redacted records. Async callbacks are bounded by `onLogMaxPending` (default 100); overflow drops the newest callback, preserving primary logging. Shutdown drains pending work. - `getStats()` exposes per-level emitted counts, hook errors, and pending/dropped callback counts; `resetStats()` resets counters. Emitted counts do not confirm delivery. - Opt-in OTel correlation/export uses the application's provider and active span, with redacted records and provider flushing. Avoid duplicate export routes; ntlogger does not own provider shutdown. - `ntlogger/eslint` exports `prefer-object-first`, with conservative autofixes for primitive constant interpolations. - Scanner credential redaction covers community strings, auth/priv passwords, and passphrases. `withSecretValues()` adds bounded asynchronous literal-value scopes. - Pretty output recognizes collection-cycle, run, work, stage, and device context fields. - Shared redaction and conformance JSON is exported under `ntlogger/contract/`. ## Python companion The separate dependency-free Python companion is version 0.1.0 under `python/` and requires Python 3.10+. It provides safe text/NDJSON formatting, context and secret scopes, handler protection, queue snapshots, and captured test logs. Preserve existing handler rotation, paths, permissions, and ownership when integrating it. See [Python instructions](../../python/README.md). The npm release workflow does not publish the Python package to PyPI. Build/install it from the tagged source using the project's normal dependency workflow. ## Validation Node unit, Python, shared-contract, and isolated package-install checks cover these features. CI additionally tests Docker-backed transports, Node 22/24, and Python 3.10/3.14 on Linux and Windows before npm publishing.