Code review comment: nit: I would debug log this, also please add a better log message - what contains what exactly? 😏

Code under review:
new FilenameFilter() {
                            @Override
                            public boolean accept(File dir, String name) {
                                if (fileName != null && !name.equals(fileName)) {
                                    return false;
                                }
                                final File f = new File(dir.getAbsolutePath(), name);
                                
                                if (StreamSupport.stream(f.toPath().spliterator(), false)
                                        .noneMatch(p -> p.endsWith(applicationId.toString()))) {
                                    return false;
                                }
                                LOG.info("Searching in {}", f.getAbsolutePath());
                                try (Scanner scanner = new Scanner(f)) {
                                    final Set<String> foundSet = new HashSet<>(mustHave.length);
                                    while (scanner.hasNextLine()) {
                                        final String lineFromFile = scanner.nextLine();
                                        for (String str : mustHave) {
                                            if (lineFromFile.contains(str)) {
                                                foundSet.add(str);
                                            }
                                        }
                                        if (foundSet.containsAll(mustHaveList)) {
                                            LOG.info("Contains");
                                            return true;
                                        }
                                    }
                                } catch (FileNotFoundException e) {
                                    LOG.warn(
                                            "Unable to locate file: "
                                                    + e.getMessage()
                                                    + " file: "
                                                    + f.getAbsolutePath());
                                }
                                LOG.info("Not contains");
                                return false;
                            }
                        });

Line commented on: LOG.info("Not contains");

Revised code:
new FilenameFilter() {
                            @Override
                            public boolean accept(File dir, String name) {
                                
                                File logFile = new File(dir.getAbsolutePath() + "/" + name);
                                try {
                                    BufferingScanner scanner =
                                            new BufferingScanner(new Scanner(logFile), 10);
                                    while (scanner.hasNextLine()) {
                                        final String lineFromFile = scanner.nextLine();
                                        for (String aProhibited : prohibited) {
                                            if (lineFromFile.contains(aProhibited)) {

                                                boolean whitelistedFound = false;
                                                for (Pattern whitelistPattern : whitelisted) {
                                                    Matcher whitelistMatch =
                                                            whitelistPattern.matcher(lineFromFile);
                                                    if (whitelistMatch.find()) {
                                                        whitelistedFound = true;
                                                        break;
                                                    }
                                                }

                                                if (!whitelistedFound) {
                                                    
                                                    
                                                    Marker fatal = MarkerFactory.getMarker("FATAL");
                                                    LOG.error(
                                                            fatal,
                                                            "Prohibited String '{}' in '{}:{}'",
                                                            aProhibited,
                                                            logFile.getAbsolutePath(),
                                                            lineFromFile);

                                                    StringBuilder logExcerpt = new StringBuilder();

                                                    logExcerpt.append(System.lineSeparator());

                                                    
                                                    
                                                    for (String previousLine :
                                                            scanner.getPreviousLines()) {
                                                        logExcerpt.append(previousLine);
                                                        logExcerpt.append(System.lineSeparator());
                                                    }

                                                    logExcerpt.append(lineFromFile);
                                                    logExcerpt.append(System.lineSeparator());
                                                    
                                                    while (scanner.hasNextLine()) {
                                                        String line = scanner.nextLine();
                                                        logExcerpt.append(line);
                                                        logExcerpt.append(System.lineSeparator());
                                                        if (line.isEmpty()
                                                                || (!Character.isWhitespace(
                                                                                line.charAt(0))
                                                                        && !line.startsWith(
                                                                                "Caused by"))) {
                                                            
                                                            
                                                            
                                                            for (int x = 0;
                                                                    x < 10 && scanner.hasNextLine();
                                                                    x++) {
                                                                logExcerpt.append(
                                                                        scanner.nextLine());
                                                                logExcerpt.append(
                                                                        System.lineSeparator());
                                                            }
                                                            break;
                                                        }
                                                    }
                                                    prohibitedExcerpts.add(logExcerpt.toString());

                                                    return true;
                                                }
                                            }
                                        }
                                    }
                                } catch (FileNotFoundException e) {
                                    LOG.warn(
                                            "Unable to locate file: "
                                                    + e.getMessage()
                                                    + " file: "
                                                    + logFile.getAbsolutePath());
                                }

                                return false;
                            }
                        }