![]() ![]() If the app.logger is accessed before configuration, it uses the default Python handlers. Note: Logging configuration should be completed before you create the Flask app object. It also sets up the message that will be logged when you call your / home route using a client like Postman. This snippet specifies where Flask will log your application based on the levels from DEBUG. Logging.basicConfig(filename='record.log', level=logging.DEBUG) To configure this type of logging in your app.py file, add this: from flask import Flask
0 Comments
Leave a Reply. |