Integration · Pino
Protect Pino logs
The adapter protects values passed to Pino and the finished line before it reaches the configured destination.
01 · Pino
Install and attach
Install the released adapter and wrap the logger boundary.
npm install @redact-secret/core@0.1.0-beta.13 @redact-secret/adapter-pino@0.1.5 pino02 · Pino
Coverage
Value-based detection complements Pino's path-based redact option.
- Covers values in log calls and the completed line.
- Does not redact object keys or anything a destination adds after the line is written.
- Detection policy still belongs to Redact Secret core.
import pino from "pino";
import { createRedactingHooks } from "@redact-secret/adapter-pino";
const logger = pino({ hooks: await createRedactingHooks() });
logger.info({ apiKey: "SYNTHETIC_REVOKED_VALUE" }, "ready");