code: def register_logger(self, logger):
          
          handler = CommandHandler(self)
          handler.setFormatter(CommandFormatter())
          logger.handlers = [handler]
          logger.propagate = False
  
          output = self.output
          level = logging.WARNING
          if output.is_debug():
              level = logging.DEBUG
          elif output.is_very_verbose() or output.is_verbose():
              level = logging.INFO
  
          logger.setLevel(level)
docs: Register a new logger.