python - How can I customize Django Logging to handling all exceptions with mail_admin? -


i'm searching way report exception error 500, sending mail settings.admins .

i had set debug false, in code when raise exception, no mail sent.

i use django 1.4

thanks !

posting relevant settings (loggers, email, , admins) may in assisting further, few pointers:

from django's docs:

in order send email, django requires few settings telling how connect mail server. @ least, you’ll need specify email_host , possibly email_host_user , email_host_password, though other settings may required depending on mail server’s configuration. consult django settings documentation full list of email-related settings.

and:

by default, django send email root@localhost. however, mail providers reject email address. use different sender address, modify server_email setting.

they gmail account:

email_host_user = 'this-is-not-a-real-address@gmail.com' email_host = 'smtp.gmail.com' email_host_password = 'mypassword' email_port = 587 email_use_tls = true server_email = email_host_user 

have checked logs on machine? postfix logs, or mail queue. maybe emails indeed being handed on django postfix (or whatever you're using) cannot deliver them reason (like 1 quoted above).

also, may interested in question/answers: how log server errors on django sites. use sentry myself.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -