In this problem, create a Flask app and see how to configure the ProfileMiddleware to add restrictions for output logs. We will filter the profile logs with the current file name for this example. Complete the below code
- Add the necessary
ProfileMiddlewarecode to enable profiling; - Make sure you use
current_file_nameto pass the variables to restrict by; - Follow the middleware initialization practices of Flask of using
app.wsgi_app.