# logging Module

*noun*

say it: **“LOG-ing MOJ-ool”** **/ˈlɒɡɪŋ ˈmɒdʒuːl/**

Python's standard module that records what a program does, with a level for how serious each message is; unlike print(), messages can be turned off or sent to a file.

## What is the `logging` module?

The `logging` module records what your program is doing, with a level for how serious each message is. Unlike `print()`, you can turn messages on or off and send them to a file.

```python
import logging
logging.basicConfig(level=logging.INFO)
logging.info("Order 1042 placed")
logging.warning("Stock running low")
```

## In a sentence

- “The **logging module** wrote "Order 1042 placed" to the log at INFO level.”
- “Switching to the **logging module** let the scheduled job write to a file instead of the screen.”

Level: Journeyman · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/logging-module
