mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-07 16:17:23 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user