Sorry for the chatter. I tracked her down. An easy test is to try:
from django.core import mail
mail.mail_admins('subk','ssdf')
If that doesn't work then the logging won't.
My logging test, was wrong. I should have used the named logger
'django.request':
logger = logging.getLogger('django.request')
logger.error('test')
finally, my problem, after i found the proper mail log file was simply
a bad server email "root@localhost". Setting SERVER_EMAIL did the
trick, although I though DEFAULT_FROM_EMAIL would.
Hopefully this will help another fool.
On Jun 8, 12:43 pm, Mike <[email protected]> wrote:
> So am am ready to deploy using apache/modwsgi. However I noticed that
> I am not getting emailed 500 errors.
>
> In my settings file I have:
>
> LOGGING = {
> 'version': 1,
> 'disable_existing_loggers': False,
> 'handlers': {
> 'mail_admins': {
> 'level': 'ERROR',
> 'class': 'django.utils.log.AdminEmailHandler'
> }
> },
> 'loggers': {
> 'django.request': {
> 'handlers': ['mail_admins'],
> 'level': 'ERROR',
> 'propagate': True,
> },
> }
>
> }
>
> ADMINS = (
> # ('Jim Zlogar', '[email protected]'),
> )
> EMAIL_HOST='localhost'
> EMAIL_PORT=25
> MANAGERS = ADMINS
> DEBUG = False
>
> However, the errors are not emailed, but only show up in .
>
> send_mail('Subject here', 'Here is the message.',
> '[email protected]', ['[email protected]'], fail_silently=False) send
> ok and shows up in the logs, however
>
> "logging.error('test') does not send any emails under manage.py
> shell.
>
> Frankly, I am lost on where even to look. I can't find any errors.
> The smtp server shows no attempts to send email.
>
> Any ideas on what is wrong or where to look?
>
> Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.