Standard log levels in order of severity:
TRACE: Finest level of detail, typically for debugging specific code paths
TRACE: Entering method calculateTax() with amount=100.50
DEBUG: Detailed information for debugging, not for production
DEBUG: Database query: SELECT * FROM users WHERE id = 123
INFO: General information about application flow
INFO: User 123 successfully logged in
WARN: Indicates a potential issue that doesn't stop the application
WARN: API rate limit approaching: 950/1000 requests used
ERROR: Error conditions that don't stop the application
ERROR: Failed to send email notification: SMTP timeout
FATAL: Severe errors that may cause the application to terminate
FATAL: Cannot connect to database, shutting down
Best practices:
- Use INFO for business events and milestones
- Use WARN for recoverable errors and degraded states
- Use ERROR for actual failures that need attention
- Use DEBUG/TRACE only in development (performance impact)
- Be consistent across your organization
- Include context (user ID, request ID, session ID)
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →