diff --git a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/InitialConfigurator.java b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/InitialConfigurator.java index fa062ae8f04bff..e8e4e84ceeec41 100644 --- a/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/InitialConfigurator.java +++ b/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/InitialConfigurator.java @@ -15,6 +15,8 @@ public final class InitialConfigurator implements EmbeddedConfigurator { public static final DelayedHandler DELAYED_HANDLER; + private volatile Boolean isQuarkusApplication = null; + static { //a hack around class loading //this is always loaded in the root class loader with jboss-logmanager, @@ -47,7 +49,15 @@ public Level getLevelOf(final String loggerName) { @Override public Handler[] getHandlersOf(final String loggerName) { - if (loggerName.isEmpty()) { + if (isQuarkusApplication == null) { + try { + Class.forName("io.quarkus.runner.ApplicationImpl", false, InitialConfigurator.class.getClassLoader()); + isQuarkusApplication = true; + } catch (ClassNotFoundException e) { + isQuarkusApplication = false; + } + } + if (loggerName.isEmpty() || !isQuarkusApplication) { if (ImageInfo.inImageBuildtimeCode()) { // we can't set a cleanup filter without the build items ready return new Handler[] {