Debug en shell en producción

This commit is contained in:
Mauricio Baeza 2017-10-22 15:13:35 -05:00
parent 76df8a101a
commit 7a2ea36b12
1 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,7 @@ format_string = '[{record.time:%d-%b-%Y %H:%M:%S}] ' \
'{record.channel}: ' \
'{record.message}'
if DEBUG:
LOG_LEVEL = 'DEBUG'
StreamHandler(
@ -53,6 +54,12 @@ else:
level=LOG_LEVEL,
format_string=format_string).push_application()
StreamHandler(
sys.stdout,
level=LOG_LEVEL,
format_string=format_string).push_application()
log = Logger(LOG_NAME)