code: def setup_file_logger(filename, formatting, log_level):
      
      logger = logging.getLogger()
      # If a stream handler has been attached, remove it.
      if logger.handlers:
          logger.removeHandler(logger.handlers[0])
      handler = logging.FileHandler(filename)
      logger.addHandler(handler)
      formatter = logging.Formatter(*formatting)
      handler.setFormatter(formatter)
      logger.setLevel(log_level)
      handler.setLevel(log_level)
      return logger
docs: A helper function for creating a file logger.
      Accepts arguments, as it is used in Status and LoggingWriter.