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-loggingSets up structured API request logging with correlation IDs, request/response capture, PII redaction, and log shipping for Node.js or Python.
/logging-reviewAnalyzes logging coverage, observability gaps, and monitoring setup in the codebase (scoped optionally by path, changes, or PR) and generates a markdown improvement plan report.
/log-setupGenerates logging setup configurations including YAML config, features list, documentation, and code for DevOps infrastructure based on provided name and description.
/analyze-logsAnalyzes application logs to identify slow requests, errors, resource issues, slow queries, and traffic patterns. Provides logging setup guides, aggregation configs, queries, dashboards, alerts, and optimization tips.
/instrumentDetects languages/frameworks (Python, JS/TS, Rust) in project, installs Logfire packages with extras, and adds instrumentation code. Reports changes and next steps.