/logging-best-practices
Structured logging with proper levels, context, PII handling, centralized aggregation. Use for application logging, log management integration, distributed tracing, or encountering log bloat, PII exposure, missing context errors.
One skill from claude-skills.
shell
$ npx -y skills add secondsky/claude-skills --skill logging-best-practices --agent claude-codeInstalls just this skill. Get the whole plugin for auto-invocation.
How it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/logging-best-practices
Context preview
The summary Claude sees to decide when to auto-load this skill.
Structured logging with proper levels, context, PII handling, centralized aggregation. Use for application logging, log management integration, distributed tracing, or encountering log bloat, PII exposure, missing context errors.
Stats
Stars194
Forks29
LanguageTypeScript
LicenseMIT
Ships with claude-skills
SKILL.md
logging-best-practices.SKILL.md
--- name: logging-best-practices description: Structured logging with proper levels, context, PII handling, centralized aggregation. Use for application logging, log management integration, distributed tracing, or encountering log bloat, PII exposure, missing context errors. license: MIT --- # Logging Best Practices Implement secure, structured logging with proper levels and context. ## Log Levels | Level | Use For | Production | |-------|---------|------------| | DEBUG | Detailed debugging | Off | | INFO | Normal operations | On | | WARN | Potential issues | On | | ERROR | Errors with recovery | On | | FATAL | Critical failures | On | ## Structured Logging (Winston) ```javascript const winston = require('winston'); const logger = winston.createLogger({ level: process.env.LOG_LEVEL || 'info', format: winston.format.combine( winston.format.timestamp(), winston.format.json() ), defaultMeta: { service: 'api-service' }, transports: [ new winston.transports.Console(), new winston.transports.File({ filename: 'error.log', level: 'error' })
