Skip to content

Instantly share code, notes, and snippets.

@iamphilrae
Created June 16, 2026 11:04
Show Gist options
  • Select an option

  • Save iamphilrae/73c6e440b2bca849510dc510c82b85d4 to your computer and use it in GitHub Desktop.

Select an option

Save iamphilrae/73c6e440b2bca849510dc510c82b85d4 to your computer and use it in GitHub Desktop.
Monolog Log Levels Reference

Monolog Log Levels Reference

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

Severity Order

DEBUG
INFO
NOTICE
WARNING
ERROR
CRITICAL
ALERT
EMERGENCY

Usage Rules

A common practical rule is:

  • DEBUG/INFO → observability
  • WARNING → attention needed soon
  • ERROR → operation failed
  • CRITICAL+ → wake someone up / trigger incident response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment