Learn Advanced Python 3: Logging
Replace print debugging with Python's logging module: levels, loggers, handlers and formatters, the logger hierarchy, exceptions, filters, and configuration with basicConfig and dictConfig.
- Intermediate level
- 3 modules
- 8 lessons
- 54 tasks and questions
Syllabus
01Logging basicsWhy programs log instead of print, how levels and thresholds decide what you see, and how handlers and formatters send each record where it belongs in the shape you want.2 lessons
02Logging in larger programsHow logger names form a tree and records travel up it, how to log exceptions and extra context, how filters trim output, and how to configure everything with basicConfig and dictConfig.5 lessons
03ProjectPut it all together in one small import tool that logs to the screen and to a file.1 lesson