@Override
    public synchronized LogEntry peek() {
      while (nextEntry == null) {
        try {
          nextEntry = parser.getNextEntry();
          if (nextEntry == null) {
            return null;
          }
          if (!nextEntry.isLast() && !patternMatch(nextEntry)) {
            continue;
          }
        } catch (IOException ioe) {
          ioe.printStackTrace(System.err);
        }
      }
      return nextEntry;
    }
Peeks at the oldest log entry read from the log file, waits for a log entry to become
available.

@return {@code null} if interrupted while waiting
geode-core/src/main/java/org/apache/geode/internal/logging/MergeLogFiles.java