static Map<String, DisplayNameAndFileStream> getStringDisplayNameAndFileStreamMap(
      List<File> files, int dirCount, boolean findPIDs, List nickNames) throws IOException {
    Map<String, DisplayNameAndFileStream> logFiles = new HashMap<>();
    for (int i = 0; i < files.size(); i++) {
      File file = files.get(i);

      String logFileName;
      if (findPIDs && nickNames.get(i) != null) {
        if (file.getCanonicalPath().toLowerCase().endsWith("gz")) {
          logFileName = nickNames.get(i) + ".gz";
        } else {
          logFileName = (String) nickNames.get(i);
        }
      } else {
        StringBuilder sb = new StringBuilder();
        File parent = file.getParentFile();
        for (int j = 0; j < dirCount && parent != null; j++) {
          String parentName = parent.getName() + "/";
          // don't add dot-slash
          if (parentName.equals("./")) {
            parent = null;
          } else {
            sb.insert(0, parentName);
            parent = parent.getParentFile();
          }
        }
        sb.append(file.getName());

        logFileName = sb.toString();
      }
      logFiles.put(file.getPath(),
          new DisplayNameAndFileStream(logFileName, new FileInputStream(file)));
    }
    return logFiles;
  }
Find all of the .log files in the given directory

@param dirName directory to search
@return all of the .log files found (Files)
geode-core/src/main/java/org/apache/geode/internal/logging/MergeLogFiles.java