Tell Flask to log to syslog

- Writes Flask warnings and errors to `/var/log/syslog`
- Helps to debug issues when running in production
This commit is contained in:
Michael Kropat
2014-06-21 23:25:35 +00:00
parent 326cc2a451
commit 53e15eae15
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -97,4 +97,8 @@ def do_updates():
if __name__ == '__main__':
if "DEBUG" in os.environ: app.debug = True
if not app.debug:
app.logger.addHandler(utils.create_syslog_handler())
app.run(port=10222)