Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to JBoss Threads 3.4.3.Final and silence JBoss Threads version printing via system property #27780

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import io.quarkus.bootstrap.app.QuarkusBootstrap;
import io.quarkus.deployment.dev.DevModeContext.ModuleInfo;
import io.quarkus.maven.dependency.ArtifactKey;
import io.quarkus.runtime.logging.JBossVersion;
import io.quarkus.runtime.util.JavaVersionUtil;
import io.quarkus.utilities.JavaBinFinder;

Expand Down Expand Up @@ -313,6 +314,7 @@ protected QuarkusDevModeLauncher() {
* Attempts to prepare the dev mode runner.
*/
protected void prepare() throws Exception {
JBossVersion.disableVersionLogging();

if (!JavaVersionUtil.isGraalvmJdk()) {
// prevent C2 compiler for kicking in - makes startup a little faster
Expand Down
2 changes: 2 additions & 0 deletions core/runtime/src/main/java/io/quarkus/runtime/Quarkus.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.jboss.logging.Logger;

import io.quarkus.launcher.QuarkusLauncher;
import io.quarkus.runtime.logging.JBossVersion;

/**
* The entry point for applications that use a main method. Quarkus will shut down when the main method returns.
Expand Down Expand Up @@ -56,6 +57,7 @@ public static void run(Class<? extends QuarkusApplication> quarkusApplication, S
public static void run(Class<? extends QuarkusApplication> quarkusApplication, BiConsumer<Integer, Throwable> exitHandler,
String... args) {
try {
JBossVersion.disableVersionLogging();
System.setProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager");
System.setProperty("java.util.concurrent.ForkJoinPool.common.threadFactory",
"io.quarkus.bootstrap.forkjoin.QuarkusForkJoinWorkerThreadFactory");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.quarkus.runtime.logging;

public final class JBossVersion {

private static final String JBOSS_LOG_VERSION = "jboss.log-version";

private JBossVersion() {
}

public static void disableVersionLogging() {
System.setProperty(JBOSS_LOG_VERSION, "false");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.opentest4j.TestAbortedException;

import io.quarkus.bootstrap.logging.InitialConfigurator;
import io.quarkus.runtime.logging.JBossVersion;
import io.quarkus.runtime.test.TestHttpEndpointProvider;
import io.quarkus.test.common.ArtifactLauncher;
import io.quarkus.test.common.DevServicesContext;
Expand Down Expand Up @@ -134,6 +135,8 @@ private QuarkusTestExtensionState ensureStarted(ExtensionContext extensionContex
private QuarkusTestExtensionState doProcessStart(Properties quarkusArtifactProperties,
Class<? extends QuarkusTestProfile> profile, ExtensionContext context)
throws Throwable {
JBossVersion.disableVersionLogging();

String artifactType = getArtifactType(quarkusArtifactProperties);

boolean isDockerLaunch = isContainer(artifactType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.junit.jupiter.api.extension.ParameterResolutionException;
import org.junit.jupiter.api.extension.ParameterResolver;

import io.quarkus.runtime.logging.JBossVersion;
import io.quarkus.test.common.ArtifactLauncher;
import io.quarkus.test.common.TestResourceManager;
import io.quarkus.test.junit.launcher.ArtifactLauncherProvider;
Expand Down Expand Up @@ -58,6 +59,8 @@ public void beforeEach(ExtensionContext context) throws Exception {
}

private LaunchResult doLaunch(ExtensionContext context, String[] arguments) throws Exception {
JBossVersion.disableVersionLogging();

if (quarkusArtifactProperties == null) {
prepare(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import io.quarkus.deployment.dev.testing.LogCapturingOutputFilter;
import io.quarkus.dev.console.QuarkusConsole;
import io.quarkus.dev.testing.TracingHandler;
import io.quarkus.runtime.logging.JBossVersion;
import io.quarkus.test.common.TestResourceManager;
import io.quarkus.test.junit.main.Launch;
import io.quarkus.test.junit.main.LaunchResult;
Expand Down Expand Up @@ -65,6 +66,8 @@ public void beforeEach(ExtensionContext context) throws Exception {

private void ensurePrepared(ExtensionContext extensionContext, Class<? extends QuarkusTestProfile> profile)
throws Exception {
JBossVersion.disableVersionLogging();

ExtensionContext.Store store = extensionContext.getStore(ExtensionContext.Namespace.GLOBAL);
Class<?> testType = store.get(IO_QUARKUS_TESTING_TYPE, Class.class);
if (testType != null) {
Expand Down Expand Up @@ -190,6 +193,8 @@ private void flushAllLoggers() {

private int doJavaStart(ExtensionContext context, Class<? extends QuarkusTestProfile> profile, String[] arguments)
throws Exception {
JBossVersion.disableVersionLogging();

TracingHandler.quarkusStarting();
Closeable testResourceManager = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.configuration.DurationConverter;
import io.quarkus.runtime.configuration.ProfileManager;
import io.quarkus.runtime.logging.JBossVersion;
import io.quarkus.runtime.test.TestHttpEndpointProvider;
import io.quarkus.test.TestMethodInvoker;
import io.quarkus.test.common.GroovyCacheCleaner;
Expand Down Expand Up @@ -204,6 +205,8 @@ public void run() {
}

private ExtensionState doJavaStart(ExtensionContext context, Class<? extends QuarkusTestProfile> profile) throws Throwable {
JBossVersion.disableVersionLogging();

TracingHandler.quarkusStarting();
hangDetectionExecutor = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {
@Override
Expand Down