public void processFiles(Function<LoggerEntry, Boolean> transport) throws IOException {
        List<Path> files = listFilesInPath(readyPath);
        if (files.size() == 0) {
            log.log(Level.FINEST, () -> "No files in ready path " + readyPath.toFile().getAbsolutePath());
            return;
        }
        log.log(Level.FINE, () -> "Files in ready path: " + files.size());

        List<File> fileList = getFiles(files);
        if ( ! fileList.isEmpty()) {
            processFiles(fileList, transport);
        }

    }
Spooler that will write an entry to a file and read files that are ready to be sent.
Files are written in JSON Lines text file format.

@author hmusum
container-search/src/main/java/com/yahoo/search/logging/Spooler.java