email - Django logged errors not sent by mail -
in django website, log errors using logging module:
logger.error('error')
i want these errors sent mail.
however, no mails being sent.
i use configuration see mail send in console (and when error 500, see mail in console):
email_backend = 'django.core.mail.backends.console.emailbackend'
i have tried logging configuration:
logging = { 'version': 1, 'handlers': { 'mail_admins': { 'class': 'django.utils.log.adminemailhandler', } }, 'loggers': { 'django': { 'handlers': ['mail_admins'], }, } }
but no see mails in console when error logged. see error message.
what can able send logged errors mail?
thanks.
Comments
Post a Comment