Monolog follows the PSR-3 logging standard and provides eight log levels, ordered from least to most severe.
| Level | Purpose | Typical Use |
|---|---|---|
debug |
Detailed diagnostic information | Variable dumps, execution flow, development troubleshooting |
info |
General application events | User logins, job starts/completions, API requests |
notice |
Normal but noteworthy events | Configuration changes, unusual but expected conditions |
warning |
Unexpected events that don't stop execution | Deprecated API usage, failed retries, missing optional data |
error |
Runtime errors affecting a specific operation | Failed database query, payment failure, uncaught exception |
critical |
Serious conditions requiring immediate attention | Major subsystem failure, unavailable database |
alert |
Action must be taken immediately | Complete service outage, data corruption detected |
emergency |
System is unusable | Application completely down |
DEBUG
INFO
NOTICE
WARNING
ERROR
CRITICAL
ALERT
EMERGENCY
A common practical rule is:
- DEBUG/INFO → observability
- WARNING → attention needed soon
- ERROR → operation failed
- CRITICAL+ → wake someone up / trigger incident response