add email handler for logging

apikeys
Laurent 4 months ago
parent 9032f94cdd
commit fb1707c585
  1. 9
      padelclub_backend/settings.py

@ -204,8 +204,17 @@ LOGGING = {
'backupCount': 10,
'formatter': 'verbose',
},
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
'django': {
'handlers': ['console', 'file'],
'level': 'INFO',

Loading…
Cancel
Save