Understanding and Practical Experience with Python's Logging Library
This article starts with the basic concepts of the Python logging library to understand its execution flow and some details that might be overlooked. Log Levels The logging library has 5 preset error levels, plus a NOTSET level, which is the default value for a logger. CRITICAL = 50 ERROR = 40 WARNING = 30 INFO = 20 DEBUG = 10 NOTSET = 0 The logging library also supports custom error levels. As seen in the source code above, there are 10 numeric positions reserved between different error levels, allowing us to add more detailed error levels on top of the preset ones. ...