What problem does it solve?
This Skill provides high-performance structured JSON logging for Node.js backends, enabling production-grade observability by producing consistent JSON logs, supporting request logging, per-request context through child loggers, and automatic redaction of sensitive data.
Core Features & Use Cases
- High-performance JSON logging for production APIs with fast ingest into observability stacks (Datadog, ELK, CloudWatch).
- Express-compatible request logging middleware that captures request context and traces per request.
- Child loggers to propagate context (requestId, userAgent, etc.) across logs.
- Redaction of sensitive fields (passwords, tokens, cookies) to protect PII.
- Simple, environment-aware configuration for development (pretty transport) and production (JSON to stdout).
Quick Start
Install the logger:
npm install pino pino-pretty
npm install -D @types/pino
Basic configuration:
Create a logger module (e.g., src/lib/logger.ts) that configures redact, base context, and a request-logging middleware, then wire the middleware into your Express app.