logging-guidelines

Define structured logging guidelines for TypeScript applications using Pino.

1|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/hypeJunction/ai-assistant-starter --skill logging-guidelines-hypejunction
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-guidelines
Source: https://github.com/hypeJunction/ai-assistant-starter/tree/main/skills/logging-guidelines
Command: npx skills add https://github.com/hypeJunction/ai-assistant-starter --skill logging-guidelines-hypejunction

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of inconsistent and unhelpful logging in applications, ensuring logs are structured, informative, and secure.

Core Features & Use Cases

  • Structured Logging: Enforces JSON format for machine readability and easier parsing.
  • Log Level Guidance: Provides clear rules for using error, warn, info, debug, and trace levels.
  • Security: Explicitly prohibits logging sensitive data like passwords, tokens, and PII.
  • Use Case: When debugging a complex user authentication flow, structured logs with correlation IDs and appropriate levels help pinpoint the exact sequence of events and identify where an error occurred.

Quick Start

Follow the provided TypeScript examples to implement structured logging with Pino.

Frequently Asked Questions about logging-guidelines

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

FAQPage Schema
How do I implement structured logging in TypeScript using Pino?

To implement structured logging in TypeScript using Pino, follow established guidelines that enforce JSON formatting for machine readability, define clear log level rules, and include contextual information like correlation IDs for effective debugging.

What is the best way to standardize application logs in TypeScript?

The best way to standardize application logs in TypeScript is to use structured logging formats like JSON, enforce strict log level guidelines, and prohibit console.log to ensure all outputs are machine-parseable and consistently formatted.

Why should I replace console.log with structured logging in TypeScript?

You should replace console.log with structured logging because console.log lacks machine-parseable formatting and contextual data, whereas structured logging enforces JSON output, appropriate log levels, and security best practices against sensitive data.

How do I prevent logging sensitive data and PII in TypeScript applications?

To prevent logging sensitive data and PII in TypeScript applications, apply explicit security guidelines that prohibit logging passwords, tokens, and personally identifiable information, ensuring structured logs remain secure and compliant.

When do I use different log levels like error, warn, info, debug, and trace?

You use log levels like error, warn, info, debug, and trace based on specific guidelines that categorize severity and diagnostic value, helping pinpoint exact sequences of events during complex debugging workflows.

Does Pino support machine-parseable JSON logs for TypeScript debugging?

Yes, Pino supports machine-parseable JSON logs for TypeScript debugging by enforcing structured formatting, allowing easier parsing, and enabling effective troubleshooting through the inclusion of relevant contextual data like correlation IDs.