From godmode
Implements structured JSON logging with levels, request tracing via correlation IDs, PII redaction, aggregation (ELK/Loki/CloudWatch), OpenTelemetry, and retention policies. Outputs design docs, logger configs, and commits. Supports flags for specific features.
How this command is triggered — by the user, by Claude, or both
Slash command
/godmode:logginggodmode/The summary Claude sees in its command listing — used to decide when to auto-load this command
# /godmode:logging Structured logging implementation. Defines log level strategies, implements JSON structured logging, sets up log aggregation pipelines, adds request tracing with correlation IDs, handles PII redaction, and configures log retention and rotation policies. ## Usage ## What It Does 1. Assesses current logging maturity (format, levels, context, correlation, aggregation, PII, retention, performance) 2. Defines log level strategy: FATAL (process dies), ERROR (operation failed), WARN (unexpected but handled), INFO (business events), DEBUG (diagnostic) 3. Implements structur...
Structured logging implementation. Defines log level strategies, implements JSON structured logging, sets up log aggregation pipelines, adds request tracing with correlation IDs, handles PII redaction, and configures log retention and rotation policies.
/godmode:logging # Full structured logging implementation
/godmode:logging --levels # Define log level strategy
/godmode:logging --structured # Implement structured JSON logging
/godmode:logging --aggregation # Set up log aggregation (ELK, Loki, CloudWatch)
/godmode:logging --tracing # Add correlation IDs and request tracing
/godmode:logging --pii # Implement PII redaction in logs
/godmode:logging --retention # Design log retention and rotation policy
/godmode:logging --opentelemetry # Integrate with OpenTelemetry
/godmode:logging --audit # Audit existing logging for gaps
docs/logging/<service>-logging.md"logging: <service> — structured logging with <features> (<coverage>)"| Level | Production | Alerts | Example |
|---|---|---|---|
| FATAL | Always | Immediate page | Startup failure, OOM |
| ERROR | Always | Alert within 5m | API call failed, DB error |
| WARN | Always | Dashboard | Retry succeeded, slow query |
| INFO | Always | — | User signup, order created |
| DEBUG | On-demand | — | SQL query, cache hit/miss |
After structured logging: /godmode:observe to add metrics and tracing alongside logs.
If error handling needed: /godmode:errorhandling to design error hierarchy first.
For security review: /godmode:secure to verify PII redaction compliance.
/godmode:logging # Full structured logging implementation
/godmode:logging --structured # Convert console.log to pino/structlog
/godmode:logging --tracing # Add correlation IDs across microservices
/godmode:logging --pii # Audit and redact PII from all log output
/godmode:logging --aggregation # Set up Grafana Loki pipeline
npx claudepluginhub arbazkhan971/godmode/setup-loggingConfigures production-grade structured logging with correlation IDs, request/response capture, PII redaction, and log shipping to aggregation platforms.
/add-loggingAdds production-quality structured logging to target files or functions with appropriate log levels, context fields, and error handling. Audits existing logging and follows project conventions.
/log-setupGenerates production-ready configurations for log aggregation using ELK, Loki, and Splunk, following best practices and security guidelines.
/logging-reviewAnalyzes logging and observability practices, identifies gaps, and creates a prioritized improvement plan. Supports scoping by file path, current changes, recent commits, or PR.
/analyze-logsAnalyzes application logs to identify performance issues—slow requests, error patterns, resource warnings, traffic trends. Produces aggregation setup, analysis queries, dashboards, and alert rules.