Logging Best Practices
Structured logging guide covering log levels, JSON formats, PII redaction, and centralized logging practices.
- CCM score
- 41 of 100
- skills.sh installs
- 748
- GitHub stars
- 396
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers log levels (DEBUG through ERROR), JSON structured formats, contextual fields, and performance logging
- Includes PII and sensitive-data redaction, centralized logging, distributed tracing, and sampling for high-volume services
- Enforces rules such as no passwords or tokens in logs, no
console.login production, and correlation IDs on every entry - Designed for backend teams setting up observability, configuring environment log levels, or debugging production issues
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill logging-best-practices -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Logging Best Practices
Table of Contents
Overview
Comprehensive guide to implementing structured, secure, and performant logging across applications. Covers log levels, structured logging formats, contextual information, PII protection, and centralized logging systems.
When to Use
- Setting up application logging infrastructure
- Implementing structured logging
- Configuring log levels for different environments
- Managing sensitive data in logs
- Setting up centralized logging
- Implementing distributed tracing
- Debugging production issues
- Compliance with logging regulations
Quick Start
Minimal working example:
// logger.ts
enum LogLevel {
DEBUG = 0, // Detailed information for debugging
INFO = 1, // General informational messages
WARN = 2, // Warning messages, potentially harmful
ERROR = 3, // Error messages, application can continue
FATAL = 4, // Critical errors, application must stop
}
class Logger {
constructor(private minLevel: LogLevel = LogLevel.INFO) {}
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- Backend & APIs, Technical Documentation, Debugging
- First seen
- Jun 3, 2026
More from aj-geddes/useful-ai-prompts
All 258- Flutter Development728
- Funnel Analysis704
- E2e Testing Automation700
- Business Case Development693
- React Component Architecture688
- Agile Sprint Planning685
- Docker Containerization685
- Log Analysis685
- Project Estimation680
- Security Compliance Audit679
- Gitlab Cicd Pipeline676
- Websocket Implementation672
- Requirements Gathering667
- Image Optimization666
- Ruby Rails Application662
- Internationalization I18n651
- Api Rate Limiting650
- Information Architecture643
- Unit Testing Framework637
- Backup Disaster Recovery634
- Color Accessibility630
- Github Actions Workflow630
- Fastapi Development628
- Static Code Analysis625
Similar to Logging Best Practices
More Backend & APIsapplication-loggingaj-geddes/useful-ai-prompts504 installsStructured logging guide for Node.js, Python, Express, Flask, and ELK pipelines with clear do and don't rules.
log-analysisaj-geddes/useful-ai-prompts685 installsStructured log analysis guide covering error triage, pattern detection, and root-cause tracing across application and system logs.
python-observabilitywshobson/agents12.5K installsStructured logging, metrics, and tracing patterns for Python services with correlation IDs and log-level guidance.
observability-and-instrumentationaddyosmani/agent-skills76K installsInstrumentation guidance that makes production behavior visible and diagnosable, covering logs, metrics, and traces.
python-logging-best-practicesterrylica/cc-skills411 installsPython logging guide covering loguru, structlog, orjson, and a zero-dependency JSONL telemetry pattern with rotation.
go-loggingcxuu/golang-skills1.2K installsStructured Go logging guide for slog, log levels, request-scoped context, and what to keep out of logs.