Learn logging
The standard library's flexible logging framework for apps and libraries
logging is Python's built-in system for recording what a program does, with levels, named loggers, pluggable handlers and formatters. Every serious application and library uses it, and frameworks such as Django, FastAPI and Celery plug into it. Learning it well means readable diagnostics in development and searchable, structured logs in production.
Before you start
How deep do you want to go?
1. EssentialsRead and write simple code, do the everyday basics
2. PracticalUse it productively at work, with the usual idioms
3. AdvancedThe less common features, performance and trade-offs
4. ExpertInternals and the edge cases experts know