logging: Create a new level DEBUG_FILTERS
This is a cleaner approach that requires less configuration in other applications. This also easily allows us to have another color. Many checks were made on being exactly at the DEBUG level, they were fixed to also check on being below DEBUG (i.e. DEBUG_FILTERS).
This commit is contained in:
parent
822c1a3607
commit
7be9a6468b
12 changed files with 27 additions and 35 deletions
|
|
@ -21,7 +21,7 @@ import re
|
|||
import sys
|
||||
from copy import deepcopy
|
||||
|
||||
from weboob.tools.log import getLogger
|
||||
from weboob.tools.log import getLogger, DEBUG_FILTERS
|
||||
from weboob.tools.ordereddict import OrderedDict
|
||||
from weboob.browser.pages import NextPage
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ class ItemElement(AbstractElement):
|
|||
self.logger.warning('Attribute %s raises %s' % (key, repr(e)))
|
||||
raise
|
||||
logger = getLogger('b2filters')
|
||||
logger.debug("%s.%s = %r" % (self._random_id, key, value))
|
||||
logger.log(DEBUG_FILTERS, "%s.%s = %r" % (self._random_id, key, value))
|
||||
setattr(self.obj, key, value)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue