From d6e8ae3b5e25baeca9e43e2645033f1044abac03 Mon Sep 17 00:00:00 2001 From: "David M. Lloyd" Date: Thu, 21 Dec 2023 08:39:38 -0600 Subject: [PATCH] Make sure all testing frameworks use `ExtHandler` This avoids the situation where `printf`-formatted messages are translated to "simple" messages due to #22844. --- .../io/quarkus/vertx/mdc/InMemoryLogHandler.java | 4 ++-- independent-projects/resteasy-reactive/pom.xml | 13 +++++++++++++ .../resteasy-reactive/server/vertx/pom.xml | 6 ++++++ .../vertx/test/framework/InMemoryLogHandler.java | 5 +++-- .../java/io/quarkus/test/InMemoryLogHandler.java | 4 ++-- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/extensions/vertx/deployment/src/test/java/io/quarkus/vertx/mdc/InMemoryLogHandler.java b/extensions/vertx/deployment/src/test/java/io/quarkus/vertx/mdc/InMemoryLogHandler.java index ecc3d790b0529..2db16e1fa057f 100644 --- a/extensions/vertx/deployment/src/test/java/io/quarkus/vertx/mdc/InMemoryLogHandler.java +++ b/extensions/vertx/deployment/src/test/java/io/quarkus/vertx/mdc/InMemoryLogHandler.java @@ -5,12 +5,12 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.logging.ErrorManager; import java.util.logging.Formatter; -import java.util.logging.Handler; import java.util.logging.LogRecord; +import org.jboss.logmanager.ExtHandler; import org.jboss.logmanager.formatters.PatternFormatter; -public class InMemoryLogHandler extends Handler { +public class InMemoryLogHandler extends ExtHandler { private static final PatternFormatter FORMATTER = new PatternFormatter("%X{requestId} ### %s"); private static final List recordList = new CopyOnWriteArrayList<>(); diff --git a/independent-projects/resteasy-reactive/pom.xml b/independent-projects/resteasy-reactive/pom.xml index d94e4537294cf..011741caa837c 100644 --- a/independent-projects/resteasy-reactive/pom.xml +++ b/independent-projects/resteasy-reactive/pom.xml @@ -51,6 +51,7 @@ 3.9.6 3.24.2 3.5.3.Final + 3.0.4.Final 2.1.1 1.7.0 3.1.0 @@ -292,6 +293,18 @@ ${jboss-logging.version} + + org.jboss.logmanager + jboss-logmanager + ${jboss-logmanager.version} + + + * + * + + + + jakarta.annotation jakarta.annotation-api diff --git a/independent-projects/resteasy-reactive/server/vertx/pom.xml b/independent-projects/resteasy-reactive/server/vertx/pom.xml index 4e4ea50e5e650..6149a3d62dc5b 100644 --- a/independent-projects/resteasy-reactive/server/vertx/pom.xml +++ b/independent-projects/resteasy-reactive/server/vertx/pom.xml @@ -100,6 +100,12 @@ jboss-logging + + org.jboss.logmanager + jboss-logmanager + test + + diff --git a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/framework/InMemoryLogHandler.java b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/framework/InMemoryLogHandler.java index b1dde96f45bc1..274570a6883c2 100644 --- a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/framework/InMemoryLogHandler.java +++ b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/framework/InMemoryLogHandler.java @@ -3,11 +3,12 @@ import java.util.ArrayList; import java.util.List; import java.util.function.Predicate; -import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogRecord; -public class InMemoryLogHandler extends Handler { +import org.jboss.logmanager.ExtHandler; + +public class InMemoryLogHandler extends ExtHandler { private final Predicate predicate; diff --git a/test-framework/junit5-internal/src/main/java/io/quarkus/test/InMemoryLogHandler.java b/test-framework/junit5-internal/src/main/java/io/quarkus/test/InMemoryLogHandler.java index 60eeb40d6f5ba..59f41cc339b4e 100644 --- a/test-framework/junit5-internal/src/main/java/io/quarkus/test/InMemoryLogHandler.java +++ b/test-framework/junit5-internal/src/main/java/io/quarkus/test/InMemoryLogHandler.java @@ -3,13 +3,13 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Predicate; -import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogRecord; +import org.jboss.logmanager.ExtHandler; import org.wildfly.common.Assert; -public class InMemoryLogHandler extends Handler { +public class InMemoryLogHandler extends ExtHandler { private final Predicate predicate;