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
|
|
@ -206,7 +206,7 @@ class StandardBrowser(mechanize.Browser):
|
|||
# display messages from httplib
|
||||
self.set_debug_http(True)
|
||||
|
||||
if logging.root.level == logging.DEBUG:
|
||||
if logging.root.level <= logging.DEBUG:
|
||||
# Enable log messages from mechanize.Browser
|
||||
self.set_debug_redirects(True)
|
||||
mech_logger = logging.getLogger("mechanize")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue