mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-06-27 17:30:38 +00:00
7ae0db7f4a
They're so noisy as to make debug logging useless otherwise
13 lines
382 B
Python
13 lines
382 B
Python
import logging
|
|
|
|
|
|
class IgnoreVariableDoesNotExist(logging.Filter):
|
|
def filter(self, record):
|
|
if(record.exc_info):
|
|
(errType, errValue, _) = record.exc_info
|
|
while errValue:
|
|
if type(errValue).__name__ == 'VariableDoesNotExist':
|
|
return False
|
|
errValue = errValue.__context__
|
|
return True
|