diff --git a/distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/ErrorPumpThread.java b/distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/ErrorPumpThread.java index 2e1d9ea3f2fe2..1498fc8ae86dc 100644 --- a/distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/ErrorPumpThread.java +++ b/distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/ErrorPumpThread.java @@ -12,6 +12,7 @@ import org.elasticsearch.bootstrap.BootstrapInfo; import org.elasticsearch.cli.Terminal; import org.elasticsearch.cli.Terminal.Verbosity; +import org.elasticsearch.common.regex.Regex; import java.io.BufferedReader; import java.io.Closeable; @@ -19,8 +20,8 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; -import java.util.List; import java.util.concurrent.CountDownLatch; +import java.util.function.Predicate; import static org.elasticsearch.bootstrap.BootstrapInfo.SERVER_READY_MARKER; import static org.elasticsearch.server.cli.ProcessUtil.nonInterruptibleVoid; @@ -84,8 +85,12 @@ void drain() { nonInterruptibleVoid(this::join); } - /** List of messages / lines to filter from the output. */ - List filter = List.of("WARNING: Using incubator modules: jdk.incubator.vector"); + /** Messages / lines predicate to filter from the output. */ + private static Predicate filter = Regex.simpleMatcher( + "WARNING: Using incubator modules: jdk.incubator.vector", + // requires log4j2 upgrade, see https://github.com/elastic/elasticsearch/issues/132035 + "WARNING: Use of the three-letter time zone ID * is deprecated and it will be removed in a future release" + ); @Override public void run() { @@ -95,7 +100,7 @@ public void run() { if (line.isEmpty() == false && line.charAt(0) == SERVER_READY_MARKER) { ready = true; readyOrDead.countDown(); - } else if (filter.contains(line) == false) { + } else if (filter.test(line) == false) { terminal.errorPrintln(Verbosity.SILENT, line, false); } }