Configuring the logging mechanism
Flask utilizes the standard logging modules of Python. The app instance has a built-in logger()
method, which is pre-configured and can log views, repositories, services, and events. The only problem is that this default logger cannot perform info logging because the default severity level of the configuration is WARNING
. By the way, turn off debug mode when running applications with a logger to avoid logging errors.
The Python logging mechanism has the following severity levels:
Debug
: This level has a severity value of 10 and can provide traces of results during the debugging process.Info
: This level has a severity value of 20 and can provide general details about execution flows.Warning
: This level has a severity value of 30 and can inform about areas of the application that may cause problems in the future due to some changes in the platform or API classes.Error
: This level has a severity value of 40 and can track down...