Hopefully lets werkzeug log

This commit is contained in:
Feliciaan De Palmenaer 2015-04-02 21:01:18 +02:00
parent 85790c0a45
commit 4c94953059
2 changed files with 3 additions and 5 deletions

View file

@ -30,7 +30,8 @@ class PrefixFix(object):
if not app.debug: if not app.debug:
app.wsgi_app = PrefixFix(app.wsgi_app, '/james') app.wsgi_app = PrefixFix(app.wsgi_app, '/james')
timedFileHandler = TimedRotatingFileHandler(app.config['LOGFILE'], when='midnight', backupCount=100) timedFileHandler = TimedRotatingFileHandler(app.config['LOGFILE'], when='midnight', backupCount=100)
timedFileHandler.setLevel(logging.INFO) timedFileHandler.setLevel(logging.DEBUG)
logger = logging.getLogger('werkzeug') logger = logging.getLogger('werkzeug')
logger.setLevel(logging.DEBUG)
logger.addHandler(timedFileHandler) logger.addHandler(timedFileHandler)
app.logger.addHandler(timedFileHandler) app.logger.addHandler(timedFileHandler)

View file

@ -10,7 +10,4 @@ from utils import *
from views import * from views import *
if __name__ == '__main__': if __name__ == '__main__':
if app.debug:
app.run(host='0.0.0.0', port=80)
else:
app.run() app.run()