logging
The standard library module for recording what a program is doing, with levels such as DEBUG, INFO, WARNING and ERROR, instead of scattering print calls.
In more detail
Log messages can be filtered by level and sent to the screen or a file without changing the code that writes them. It is the grown-up replacement for debug prints in long-running programs.
Related terms
- debugging — Finding and fixing the cause of a bug, by observing what the program actually does and comparing it with what it should do.
- standard library — The collection of modules that ships with a programming language, available without installing anything extra.
Taught in
- Raising, And Writing Your Own Exception — Hands-on Python: Complete Video Course & Book
- A Standard Library Tour — Hands-on Python: Complete Video Course & Book