code: def setup_logger(self):
          
          self.log_list = []
          handler = ListHandler(self.log_list)
  
          formatter = logging.Formatter(
              '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
          handler.setFormatter(formatter)
  
          logger = logging.getLogger()
          logger.addHandler(handler)
  
          logger.setLevel(logging.INFO)
  
          self.handler = handler
          self.logger = logger
docs: Setup a logger