logging-standards

Enforce structured logging standards with structlog, Seq, and OpenTelemetry.

1|Updated Dec 14, 2025
One-click install
npx skills add https://github.com/komluk/scaffolding.template --skill logging-standards-komluk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-standards
Source: https://github.com/komluk/scaffolding.template/tree/main/stacks/_common/.claude/skills/logging-standards
Command: npx skills add https://github.com/komluk/scaffolding.template --skill logging-standards-komluk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill establishes clear guidelines and best practices for consistent, structured, and informative logging across applications, making debugging, monitoring, and analysis significantly easier.

Core Features & Use Cases

  • Structured Logging: Enforces a consistent format for log messages, including timestamps, levels, correlation IDs, and contextual data.
  • Log Level Guidance: Provides clear definitions and use cases for different log levels (TRACE, DEBUG, INFO, WARN, ERROR, FATAL).
  • PII Masking: Details how to handle and mask Personally Identifiable Information (PII) in logs.
  • Error & Performance Logging: Outlines requirements for logging errors and performance metrics effectively.
  • Use Case: When developing a new microservice, use this Skill to ensure all log statements adhere to the defined standards, enabling seamless integration with the central logging system and quick identification of issues.

Quick Start

Use the logging-standards skill to review the current log statements in the codebase for adherence to structured logging best practices.

Frequently Asked Questions about logging-standards

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

FAQPage Schema
How do I implement structured logging in Python with structlog?

Structured logging with structlog enforces consistent log formats by defining message structures, injecting context variables, and using specific patterns for different events to ensure application logs are easily parsable and searchable.

What is the best way to mask PII in application logs?

Masking PII in application logs requires adhering to defined message structures that automatically redact sensitive fields. This ensures Personally Identifiable Information is sanitized before logs are sent to aggregation tools.

When should I use different log levels like WARN, ERROR, and DEBUG?

Log levels should be used based on specific event definitions: TRACE and DEBUG for diagnostics, INFO for runtime events, WARN for anomalies, and ERROR or FATAL for critical failures requiring immediate attention.

Does structured logging work with OpenTelemetry and Seq integration?

Structured logging integrates seamlessly with log aggregation tools like Seq and OpenTelemetry by enforcing consistent formats, timestamps, and correlation IDs, enabling effective performance tracking and centralized monitoring.

How do I standardize application logs for a new microservice?

Standardizing application logs for a new microservice involves reviewing log statements against best practices, ensuring consistent formats, appropriate log levels, and context variable injection for seamless central logging system integration.

What are the limitations of structured logging without correlation IDs?

Without correlation IDs, structured logging loses the ability to trace requests across distributed microservices, making it difficult to track errors and performance metrics effectively within aggregation tools.