Don't log VDEBUG messages with --debug.

This reduces the log spam quite a bit, which also makes things easier when
dealing with CI output.
This commit is contained in:
Florian Bruhin 2015-11-23 21:40:11 +01:00
parent 9479a50784
commit b0d4ebe844

View File

@ -140,12 +140,15 @@ class CriticalQtWarning(Exception):
def init_log(args):
"""Init loggers based on the argparse namespace passed."""
level = 'VDEBUG' if args.debug else args.loglevel.upper()
level = args.loglevel.upper()
try:
numeric_level = getattr(logging, level)
except AttributeError:
raise ValueError("Invalid log level: {}".format(args.loglevel))
if numeric_level > logging.DEBUG and args.debug:
numeric_level = logging.DEBUG
console, ram = _init_handlers(numeric_level, args.color, args.loglines)
root = logging.getLogger()
if console is not None: