Hopefully lets werkzeug log
This commit is contained in:
parent
85790c0a45
commit
4c94953059
2 changed files with 3 additions and 5 deletions
|
@ -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)
|
||||||
|
|
|
@ -10,7 +10,4 @@ from utils import *
|
||||||
from views import *
|
from views import *
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if app.debug:
|
app.run()
|
||||||
app.run(host='0.0.0.0', port=80)
|
|
||||||
else:
|
|
||||||
app.run()
|
|
||||||
|
|
Loading…
Reference in a new issue