Course contentsShow
← Cloud and Infrastructure
Lesson 2007 of 2,98943. Observability - LoggingFree lesson

Log Levels and Severity

Understand standard log levels (DEBUG, INFO, WARN, ERROR, FATAL) and when to use each appropriately.

Log Levels and Severity

What You'll Learn

You'll learn the standard log levels used across observability platforms and when to apply each severity level appropriately.

The Five Standard Log Levels

Think of log levels like priority lanes on a highway—each one signals how urgent the message is and who should respond.

DEBUG

The most verbose level, used during development or troubleshooting. Debug logs capture granular details like variable values, loop iterations, or function entry/exit points. Use sparingly in production—they create massive volume and noise.

Example: "User authentication token validated successfully"

INFO

Informational messages about normal operations. These confirm that things are working as expected—application startup, configuration loaded, routine transactions completed.

Example: "Payment service started on port 8080"

WARN

Something unexpected happened, but the system recovered automatically. Warnings don't require immediate action but should be monitored for patterns that might indicate deeper issues.

Example: "Cache miss, falling back to database query"

ERROR

A failure occurred that prevented a specific operation from completing. The application continues running, but user impact may have occurred. Errors demand investigation.

Example: "Failed to connect to payment gateway after 3 retries"

FATAL

Catastrophic failure causing the application to terminate. These are rare and require immediate emergency response.

Example: "Database connection pool exhausted, shutting down"

Choosing the Right Level

Match the severity to the impact: DEBUG and INFO generate the most logs (high volume, low urgency), while ERROR and FATAL are rare but critical. WARN sits in between as your early warning system.

In structured logging systems, these levels enable filtering and alerting—ERROR logs might page an engineer, while DEBUG only appears when explicitly enabled.

Key Takeaway: Log levels create a severity hierarchy (DEBUG → INFO → WARN → ERROR → FATAL) that helps teams filter signal from noise and respond appropriately to system events.