0 1 0
Brett Smith - 13 months ago 2019-09-30 15:19:54
brettcsmith@brettcsmith.org
settings: Add a console logger.
1 file changed with 9 insertions and 3 deletions:
↑ Collapse Diff ↑
...
 
@@ -237,9 +237,7 @@ INSTALLED_APPS = [
237 237
 
    'email_log',
238 238
 
]
239 239
 

	
240
 
# A sample logging configuration. The only tangible logging
241
 
# performed by this configuration is to send an email to
242
 
# the site admins on every HTTP 500 error when DEBUG=False.
240
 
# A sample logging configuration.
243 241
 
# See http://docs.djangoproject.com/en/dev/topics/logging for
244 242
 
# more details on how to customize your logging configuration.
245 243
 
LOGGING = {
...
 
@@ -251,6 +249,10 @@ LOGGING = {
251 249
 
        }
252 250
 
    },
253 251
 
    "handlers": {
252
 
        'console': {
253
 
            'level': os.environ.get('DJANGO_LOG_LEVEL', 'WARNING'),
254
 
            'class': 'logging.StreamHandler',
255
 
        },
254 256
 
        "mail_admins": {
255 257
 
            "level": "ERROR",
256 258
 
            "filters": ["require_debug_false"],
...
 
@@ -258,6 +260,10 @@ LOGGING = {
258 260
 
        }
259 261
 
    },
260 262
 
    "loggers": {
263
 
        'django': {
264
 
            'handlers': ['console'],
265
 
            'propagate': True,
266
 
        },
261 267
 
        "django.request": {
262 268
 
            "handlers": ["mail_admins"],
263 269
 
            "level": "ERROR",
0 comments (0 inline, 0 general)