logging-guide

Guide structured JSON logging with log levels and sensitive data masking.

70|13|Updated Dec 24, 2025
One-click install
npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill logging-guide-asiaostrich
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-guide
Source: https://github.com/AsiaOstrich/universal-dev-standards/tree/main/.gemini/skills/logging-guide
Command: npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill logging-guide-asiaostrich

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement consistent, structured, and actionable application logs across all environments, ensuring better observability and security.

Core Features & Use Cases

  • Structured Logging: Enforces consistent JSON format with essential fields.
  • Log Level Guidance: Provides clear definitions and decision trees for using log levels (TRACE, DEBUG, INFO, WARN, ERROR, FATAL).
  • Sensitive Data Handling: Offers strategies for masking and redacting sensitive information.
  • Use Case: When adding new logging to a service, use this Skill to ensure all logs include a trace_id, user_id, and are appropriately leveled, preventing sensitive data leaks.

Quick Start

Use the logging-guide skill to add structured logging to your application.

Frequently Asked Questions about logging-guide

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

FAQPage Schema
How do I implement structured logging in JSON format across diverse application environments?

Structured logging in JSON format is implemented by enforcing consistent required and recommended fields with snake_case naming conventions for domains like HTTP, Database, and User, ensuring better observability across diverse application environments.

What is the best way to handle sensitive data masking and PII in application logs?

Sensitive data masking and PII handling in application logs is achieved by applying specific directives for redacting sensitive information, enforcing secure application logs, and preventing sensitive data leaks across all environments.

How do I choose the appropriate log levels for error handling and observability?

Choosing appropriate log levels involves using clear definitions and decision trees for TRACE, DEBUG, INFO, WARN, ERROR, and FATAL to ensure accurate error handling and observability context in your application.

Does this structured logging guidance work for adding trace_id and user_id to new services?

Yes, this structured logging guidance works for new services by ensuring all logs include essential identifiers like trace_id and user_id, providing necessary context and improving traceability across diverse application environments.

When do I need to add error logging context to my application logs?

Error logging context needs to be added when implementing structured logging to ensure better observability, adhering to JSON format with required fields and sensitive data handling directives across all environments.