Add DEBUGLOG flag for enabling full debug logs in all gunicorn components

Fixes #625
This commit is contained in:
Joseph Schorr 2015-10-13 10:45:49 -04:00
parent e80fcc1b28
commit e467cda72d
3 changed files with 13 additions and 0 deletions

View file

@ -1,5 +1,6 @@
import logging
import logging.config
import os
from app import app as application
@ -9,5 +10,8 @@ import endpoints.decorated
from endpoints.v1 import v1_bp
# from endpoints.v2 import v2_bp
if os.environ.get('DEBUGLOG') == 'true':
logging.config.fileConfig('conf/logging_debug.conf', disable_existing_loggers=False)
application.register_blueprint(v1_bp, url_prefix='/v1')
# application.register_blueprint(v2_bp, url_prefix='/v2')

View file

@ -1,3 +1,4 @@
import os
import logging
import logging.config
@ -5,5 +6,7 @@ from app import app as application
from endpoints.verbs import verbs
if os.environ.get('DEBUGLOG') == 'true':
logging.config.fileConfig('conf/logging_debug.conf', disable_existing_loggers=False)
application.register_blueprint(verbs, url_prefix='/c1')

6
web.py
View file

@ -1,3 +1,6 @@
import os
import logging.config
from app import app as application
from endpoints.api import api_bp
@ -9,6 +12,9 @@ from endpoints.githubtrigger import githubtrigger
from endpoints.gitlabtrigger import gitlabtrigger
from endpoints.bitbuckettrigger import bitbuckettrigger
if os.environ.get('DEBUGLOG') == 'true':
logging.config.fileConfig('conf/logging_debug.conf', disable_existing_loggers=False)
application.register_blueprint(web)
application.register_blueprint(githubtrigger, url_prefix='/oauth2')
application.register_blueprint(gitlabtrigger, url_prefix='/oauth2')