From 146377454d45d124591e54fa34ddedd0b03dd171 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Fri, 5 Oct 2018 10:45:02 -0400 Subject: [PATCH] settings: Add a console logger. --- pinaxcon/settings.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index 5b8c9f0..3a91070 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -237,9 +237,7 @@ INSTALLED_APPS = [ 'email_log', ] -# A sample logging configuration. The only tangible logging -# performed by this configuration is to send an email to -# the site admins on every HTTP 500 error when DEBUG=False. +# A sample logging configuration. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { @@ -251,6 +249,10 @@ LOGGING = { } }, "handlers": { + 'console': { + 'level': os.environ.get('DJANGO_LOG_LEVEL', 'WARNING'), + 'class': 'logging.StreamHandler', + }, "mail_admins": { "level": "ERROR", "filters": ["require_debug_false"], @@ -258,6 +260,10 @@ LOGGING = { } }, "loggers": { + 'django': { + 'handlers': ['console'], + 'propagate': True, + }, "django.request": { "handlers": ["mail_admins"], "level": "ERROR",