I have a server written on flask and I need to do error tracking (name of error, what caused the error, name of file and line with error). How should I do it? I'll appreciate any help.
Asked
Active
Viewed 34 times
1 Answers
0
enable the flask debugger, by setting debug to True for your flask app.
app = Flask(__name__)
app.config['DEBUG'] = True
As you shouldn't enable debug for a production server, you can create a logging handler as follows: http://flask.pocoo.org/docs/0.12/errorhandling/

olisch
- 960
- 6
- 11
-
and what will it do? could you, please, describe more precisely? – Zirochka May 28 '17 at 17:00
-
you will get a traceback for debbuging, as explained in werkzeug documentation: http://werkzeug.pocoo.org/docs/0.12/debug/ – olisch May 28 '17 at 17:09