logging

Configures structured JSON logging in Node.js apps with Pino or Winston, including request tracing and redaction of sensitive data.

3|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill logging-mauriciodelrio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging
Source: https://github.com/mauriciodelrio/delriodev-skills/tree/main/es-skills/software/backend/logging
Command: npx skills add https://github.com/mauriciodelrio/delriodev-skills --skill logging-mauriciodelrio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the chaos of unstructured logs in Node.js applications, which make debugging, monitoring, and compliance nearly impossible by ensuring all logs are parseable, secure, and context-rich.

Core Features & Use Cases

  • Pino Configuration: Sets up fast JSON logging with automatic redaction of sensitive data like passwords and tokens.
  • Request Tracing and Levels: Implements middleware for request IDs, child loggers, and environment-specific log levels from fatal to trace.
  • Use Case: In a e-commerce backend, use this to log order processing events with user context, mask payment details, and monitor health endpoints without exposing PII, enabling quick issue resolution in production.

Quick Start

Configure structured logging for my Node.js Express app using Pino, including request middleware and data masking for sensitive fields like passwords and tokens.

Frequently Asked Questions about logging

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

FAQPage Schema
How do I set up structured logging in Node.js to output JSON and mask sensitive data?

Structured logging in Node.js formats log output as parseable JSON and automatically redacts sensitive fields like passwords and tokens. This ensures logs are secure, context-rich, and ready for production observability.

How do I implement request tracing and manage log levels in a Node.js backend?

Request tracing in Node.js uses middleware to generate request IDs and child loggers, linking related events together. Log level management controls output verbosity from fatal to trace based on the environment.

Does Pino support automatic redaction of passwords and tokens for secure Node.js logs?

Yes, Pino supports automatic redaction of sensitive data like passwords and tokens. This prevents PII exposure during request tracing and health monitoring while maintaining context-rich, parseable JSON logs.

What's the best way to monitor health endpoints in Node.js without exposing PII?

The best way to monitor health endpoints without exposing PII is using structured JSON logging with configured data masking. This masks sensitive user context while logging operational events for quick issue resolution.

Can I use Winston instead of Pino for structured JSON logging and log level management?

Yes, structured JSON logging and log level management can be implemented with Winston as an alternative to Pino. Both satisfy requirements for parseable output, sensitive data redaction, and environment-specific log levels.