Skip to content

Commit

Permalink
Update settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg authored Feb 6, 2020
1 parent 7d049a2 commit 682d306
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions web/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,22 @@

# Logging
if DEBUG:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
DEFAULT_LOG_LEVEL = 'DEBUG'
else:
DEFAULT_LOG_LEVEL = 'ERROR'

LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
'loggers': {
'django': {
'handlers': ['console'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
},
},
'loggers': {
'django': {
'handlers': ['console'],
'level': os.getenv('DJANGO_LOG_LEVEL', DEFAULT_LOG_LEVEL),
},
}
},
}

0 comments on commit 682d306

Please sign in to comment.