July 2019
Beginner to intermediate
302 pages
9h 38m
English
By default, Flask will not log anything for us anywhere, except for the errors with their stack traces, which are sent to the logger (we will see more of this in the rest of the chapter). It does create a lot of stack traces while we run the application in the development mode using run.py, but, in production systems, we don't have this luxury. Thankfully, the logging library provides a whole lot of log handlers, which can be used as per requirements. In this recipe, we will understand how the logging library can be leveraged to ensure that effective logs are being captured from Flask applications.