#17069: Extend the error logger's API to allow ignoring some errors
-------------------------------+------------------------------------
     Reporter:  julien         |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  Documentation  |                  Version:  SVN
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by dlowe):

 FWIW here's the logging filter class I'm using to narrowly suppress
 IOError exceptions raised from _get_raw_post_data():

 {{{
 import sys, traceback
 class _SuppressUnreadablePost(object):
     def filter(self, record):
         _, exception, tb = sys.exc_info()
         if isinstance(exception, IOError):
             for _, _, function, _ in traceback.extract_tb(tb):
                 if function == '_get_raw_post_data':
                     return False
         return True
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17069#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to