code: def set_log_level_format(level, format):
      
      formatter = logging.Formatter(fmt=format)
      logger.handlers[0].setFormatter(formatter)
      logger.setLevel(level)
docs: Set logger level and format.
  
      :param level: logging level; see the :py:mod:`logging` constants.
      :type level: int
      :param format: logging formatter format string
      :type format: str