diff options
author | Patrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com> | 2014-08-22 16:19:25 +0000 |
---|---|---|
committer | Patrick Maia <pmaia@thoughtworks.com> | 2014-08-22 17:13:22 +0000 |
commit | 285f3e706195631e1094791e0399de4530f9a70d (patch) | |
tree | 4adb76b27a3aa6a39b0dce4c69dfa92abf35c7b9 /service/pixelated/user_agent.py | |
parent | 797d8553959cf9f3998eb753f42349f92e2f52fd (diff) |
adds log capacity to pixelated user agent
Diffstat (limited to 'service/pixelated/user_agent.py')
-rw-r--r-- | service/pixelated/user_agent.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/service/pixelated/user_agent.py b/service/pixelated/user_agent.py index c4278725..8737d8c6 100644 --- a/service/pixelated/user_agent.py +++ b/service/pixelated/user_agent.py @@ -1,4 +1,5 @@ import json +import os import datetime import dateutil.parser as dateparser @@ -131,10 +132,12 @@ def index(): def setup(): - reactor_manager.start_reactor() + debug_enabled = os.environ.get('DEBUG', False) + reactor_manager.start_reactor(logging=debug_enabled) app.config.from_pyfile('../config/pixelated_ua.cfg') account = app.config['ACCOUNT'] - app.run(host=app.config['HOST'], debug=app.config['DEBUG'], port=app.config['PORT']) + app.config['DEBUG'] = debug_enabled + app.run(host=app.config['HOST'], debug=debug_enabled, port=app.config['PORT']) if __name__ == '__main__': |