Logging and error reporting
Logging and error reporting are intrinsic to a production-ready web app. Logging keeps a record of all problems even if your app has crashed, while error reporting can directly notify us of specific problems even though the site keeps running.
It can be very gratifying to discover errors before anyone has reported them. It also makes it possible to roll out fixes before your users start complaining to you. However, to do this, you need to know what those errors were, when they occurred, and what caused them.
Fortunately, as must be quite familiar right now, Python and Flask already have this in hand.
Logging
Flask comes with a built-in logger—an already defined instance of Python's built-in logger. You will hopefully be ...
Get Learning Flask Framework now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.