Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Logging exception filters in python

Quy Tang:

I want to Exclude some specific exceptions that are not critical from Logging to sentry using raven handler.

However, I couldn't find out any way to config the Filters for those handlers.

The similar logging feature in Java is http://ift.tt/206Q2yp

I want to do something like this


import logging
...

LOGGING = {
'loggers' = {
'django': {
'handlers': ['sentry', 'console'],
'filters': {
'exclude': [ObjectDoesNotExist, ]
},
'level': 'ERROR',
}
}
}

Do logging package support that? If no, would you mind telling me the best way to achieve that?

Thanks



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Logging exception filters in python

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×