code: def flush(self):
      
      self.acquire()
      try:
        self.stream.flush()
      except (EnvironmentError, ValueError):
        # A ValueError is thrown if we try to flush a closed file.
        pass
      finally:
        self.release()
docs: Flushes all log files.