backend-pino

Configure Pino structured JSON logging with redaction and child loggers for Node.js backends.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/andrey-belen/alto-iam-cloud --skill backend-pino-andrey-belen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-pino
Source: https://github.com/andrey-belen/alto-iam-cloud/tree/main/.claude/skills/backend-pino
Command: npx skills add https://github.com/andrey-belen/alto-iam-cloud --skill backend-pino-andrey-belen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pino, pino-pretty, @types/pino.

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.

Frequently Asked Questions about backend-pino

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up structured JSON logging in a Node.js backend?

Structured JSON logging in a Node.js backend is configured by creating a logger module that defines redact rules, base context, and request-logging middleware before wiring it into an Express app. This enables consistent JSON output for production observability.

How do I redact sensitive data like passwords and tokens in Node.js logs?

Redact sensitive data in Node.js logs by defining redact rules within your logger configuration to automatically mask fields like passwords, tokens, and cookies. This protects PII while outputting structured JSON.

How do I propagate request context across logs in an Express API?

Propagate request context across logs in an Express API by using child loggers to attach per-request data like requestId and userAgent. This traces individual requests through your Node.js backend.

Can I use different logging transports for development and production in Node.js?

Different logging transports for development and production in Node.js are supported through environment-aware configuration. Development uses a pretty transport for readability, while production outputs JSON to stdout for fast ingest into observability stacks.

What is the best way to send Node.js logs to Datadog, ELK, or CloudWatch?

The best way to send Node.js logs to Datadog, ELK, or CloudWatch is using high-performance JSON logging that outputs to stdout. This ensures fast ingest into observability stacks without blocking the event loop.

What dependencies do I need to install for Pino logging in a TypeScript Node.js project?

Dependencies needed for Pino logging in a TypeScript Node.js project include the pino and pino-pretty packages, plus @types/pino installed as a development dependency to provide TypeScript definitions.