docs: synchronized public void flushRecordsToLogFile(SessionId sessionId,
        List<LogRecord> records) throws IOException {
      LogFile logFile = sessionToLogFileMap.get(sessionId);
  
      if (logFile == null) {
        createLogFileAndAddToMap(sessionId);
        logFile = sessionToLogFileMap.get(sessionId);
      }
  
      logFile.openLogWriter();
      for (LogRecord record : records) {
        logFile.getLogWriter().writeObject(record);
      }
      logFile.closeLogWriter();
    }