msg = "Wrong file {!r} - ".format(cfg_file) + str(e)
self.handle_error(msg, e.__class__.__name__)
continue
+ if self.verbose:
+ if 'root' in log_cfg:
+ log_cfg['root']['level'] = 'DEBUG'
+ if 'handlers' in log_cfg:
+ for handler_name in log_cfg['handlers'].keys():
+ handler = log_cfg['handlers'][handler_name]
+ handler['level'] = 'DEBUG'
if self.verbose > 1:
LOG.debug("Evaluated configuration from JSON:\n{} ...".format(pp(log_cfg)))
try:
root_logger = logging.getLogger()
-# for log_handler in root_logger.handlers:
-# root_logger.removeHandler(log_handler)
-
if self._init_logging_from_jsonfile():
+ if self.verbose:
+ root_logger.setLevel(logging.DEBUG)
return
-# self.init_logging()
-
return
# -------------------------------------------------------------------------