protected void writeFilteredLogFile(Path originalLogFile, Path filteredLogFile)
      throws IOException {
    logFilter.startNewFile();

    try (BufferedReader reader = new BufferedReader(new FileReader(originalLogFile.toFile()))) {
      try (BufferedWriter writer = new BufferedWriter(new FileWriter(filteredLogFile.toFile()))) {

        String line;
        while ((line = reader.readLine()) != null) {
          LogFilter.LineFilterResult result = logFilter.acceptsLine(line);

          if (result == LogFilter.LineFilterResult.REMAINDER_OF_FILE_REJECTED) {
            break;
          }

          if (result == LogFilter.LineFilterResult.LINE_ACCEPTED) {
            writeLine(line, writer);
          }
        }
      }
    }
  }
@return Path to the zip file that has all the filtered files, null if no files are selected to
        export.
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/util/LogExporter.java