def set_log_level_for_all_loggers(level=logging.DEBUG):
 root_logger = logging.getLogger()
 loggers = logging.Logger.manager.loggerDict.values()
 loggers += [root_logger]
 for logger in loggers:
  if (not isinstance(logger, logging.Logger)):
   continue
  set_log_level_for_all_handlers(logger=logger)

def set_log_level_for_all_loggers ( level = logging . DEBUG ) : root_logger = logging . getLogger ( ) loggers = logging . Logger . manager . loggerDict . values ( ) loggers += [ root_logger ] for logger in loggers : if ( not isinstance ( logger , logging . Logger ) ) : continue set_log_level_for_all_handlers ( logger = logger )
set a log level for all the loggers and handlers to the provided level .