On Nov 6, 2008, at 6:11 AM, Delta20 wrote:
> > I just realized that I accidentally named the template 400.html not > 404.html... d'oh. I definitely need a better way of diagnosing 500 > errors. > > Thanks to the pointer to the email settings. I will set that up, but > I'm wondering if there's a way to direct django to log those errors > rather than email it. I see there is a middleware component, django- > db- > log that seems to do that. I am using django-logging, and it would be > very handy to find a way to get the error messages to go the log file > instead. Django-logging is pretty much just python's standard logging module with a custom handler and some fancy additions, so you can define your own file handler and use it in middleware or views to log messages to a local file: http://docs.python.org/library/logging.html#filehandler > > > That aside, I couldn't imagine a live production deployment of django > using email for logging errors. It's actually not a bad idea! Given that server errors should NOT be a ten-per-minute kind of thing, you definitely want to know as soon as possible when one occurs. The logging module is impressive: silly things like getting an IM or a twitter when an error occur are relatively easy to set up. Even getting internal 404s via email isn't too onerous, provided you make good use of ignorable_404_ends. Yours, Eric > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---