Log Level Selection Guide

D

Daniel Okoye

@daniel-okoye

·

Select appropriate log levels for statements using examples.

34 copies0 forks
Select the appropriate log level using these examples.

Examples:
- "User successfully logged in" → INFO (Normal operation milestone)
- "Retry attempt 2 of 3 for external API" → WARN (Recoverable issue, needs attention)
- "NullPointerException in payment processing" → ERROR (Failure requiring investigation)
- "Database query took 50ms" → DEBUG (Operational detail for troubleshooting)
- "Entering calculateTax with params: {...}" → TRACE (Detailed execution flow)
- "Application starting on port 8080" → INFO (Startup milestone)

Log statement: {{log_statement}}
Context: {{context}}

Select level with justification and any message improvements.

Details

Category

Coding

Use Cases

Logging standards enforcementCode review guidanceObservability improvement

Works Best With

claude-opus-4.5gpt-5.2gemini-2.0-flash
Created Updated Shared

Create your own prompt vault and start sharing