logging

Standardize logging practices with structured logs and correlation IDs.

17|1|Updated Jun 8, 2025
One-click install
npx skills add https://github.com/williamzujkowski/standards --skill logging-williamzujkowski
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging
Source: https://github.com/williamzujkowski/standards/tree/main/skills/observability/logging
Command: npx skills add https://github.com/williamzujkowski/standards --skill logging-williamzujkowski

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Logging Skill defines standards for logging practices, including structure, correlation IDs, and integration with observability pipelines.

Core Features & Use Cases

  • Structured Logs: Consistent format for log ingestion and parsing.
  • Correlation & Tracing: End-to-end tracing with IDs to track requests.
  • Observability Integration: Log forwarding to SIEMs and dashboards.

Quick Start

Implement structured logging across a service and attach correlation IDs to requests.

Frequently Asked Questions about logging

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

FAQPage Schema
How do I implement structured logging across my application?

Structured logging standardizes log output into consistent formats (typically JSON) for reliable parsing and ingestion. Implement it by enforcing a schema across your codebase, attaching correlation IDs to requests for end-to-end tracing, and forwarding logs to a centralized aggregation platform like a SIEM or observability dashboard.

What are correlation IDs and why do I need them in logging?

Correlation IDs are unique identifiers attached to each request that propagate through your entire system, enabling end-to-end tracing across services and logs. They solve the problem of tracking a single user request or transaction through distributed systems and multiple log entries.

Can I integrate my logs with a SIEM or observability platform?

Yes. Structured logging is designed for integration with SIEMs and observability pipelines. Configure log forwarding from your application to your chosen platform, ensure secure transport, apply data redaction for sensitive information, and set up access controls to manage who can view logs.

What logging practices should I enforce in production systems?

Production logging requires structured format, centralized log aggregation, data redaction for sensitive values, secure transport protocols, access controls, log rotation policies, and regular dependency updates. Use linting and SAST verification to enforce these standards across your infrastructure and CI/CD pipelines.

How does structured logging improve debugging and monitoring?

Structured logging produces machine-parseable output that enables consistent querying, filtering, and alerting. Combined with correlation IDs, it allows you to reconstruct the full sequence of events for any transaction, significantly reducing time spent searching unstructured logs during incident response.

What's the best way to handle sensitive data in logs?

Apply data redaction policies to mask or exclude sensitive information before logs reach aggregation systems. Pair this with access controls to restrict who can view logs, secure transport to prevent interception, and regular dependency updates to patch logging library vulnerabilities.