def set_log_level_for_all_handlers(logger, level=logging.DEBUG):
 logger.setLevel(level)
 handlers = logger.handlers
 for handler in handlers:
  handler.setLevel(level)
 return logger

def set_log_level_for_all_handlers ( logger , level = logging . DEBUG ) : logger . setLevel ( level ) handlers = logger . handlers for handler in handlers : handler . setLevel ( level ) return logger
set a log level for all the handlers on the provided logger .