Commit 0bc69cfb authored by Pietro Albini's avatar Pietro Albini

Log frontend exceptions to the standard output

parent 25512029
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
import queue import queue
import threading import threading
import logging
import flask import flask
...@@ -70,4 +71,10 @@ def create_app(manager, processor): ...@@ -70,4 +71,10 @@ def create_app(manager, processor):
processor.append(flask.request.json) processor.append(flask.request.json)
return "OK", 200 return "OK", 200
# Because it's impossible to run this app in debug mode, this handler
# prints exceptions to the standard output
handler = logging.StreamHandler()
handler.setLevel(logging.INFO)
app.logger.addHandler(handler)
return app return app
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment