# Log Level

> A tag on each log line that says how serious it is.

**Field:** Infrastructure  
**Category:** Monitoring & Observability  
**Also known as:** Logging Level, Log Severity, Severity Level

## Think of it like

It is like the volume knob on a radio. Turn it down and you only hear the loud parts.

## Definition

A log level says how serious a log line is. Common levels, from least to most serious, are DEBUG, INFO, WARN, ERROR and FATAL. You set a level for each program. Lines below that level are dropped, and lines at it or above are kept. The old syslog standard uses eight levels, numbered from 0 for emergency to 7 for debug.

## Example

On her laptop, Emma logs at DEBUG to see every step. On the live server she sets WARN, so only warnings and errors are kept.

## Example code

```python
import logging
logging.basicConfig(level=logging.WARNING)
logging.info("cart opened")      # dropped
logging.error("payment failed")  # kept: ERROR:root:payment failed
```

The level is set to WARNING. The info line is dropped and the error line is printed.

## Why it matters

The right level keeps logs small enough to search and cheap enough to store.

## Common mistake

Logging normal events as ERROR. Real errors then hide among hundreds of false ones.

## Three principles

- **A ladder.** From chatty DEBUG up to FATAL.
- **A cut-off.** Lines below the set level are dropped.
- **Different per place.** Chatty on a laptop, quiet when live.

## Related terms

- [Logging](https://learn.benibix.com/term/infrastructure/logging)
- [Alerting](https://learn.benibix.com/term/infrastructure/alerting)
- [Observability](https://learn.benibix.com/term/infrastructure/observability)

![A ladder of five log levels from bottom to top: DEBUG, INFO, WARN, ERROR, FATAL. The lower ones are the noisiest, the upper ones the most serious. A line is drawn above INFO, marked set to WARN. Messages above the line are kept, and those below are dropped.](https://learn.benibix.com/diagrams/inf-log-levels.svg)

---

Source: https://learn.benibix.com/term/infrastructure/log-level
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
