Fix log duplication we experienced in Jenkins when testing RHBQ 3.8 #1298
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
For context, this is current state:
java.util.logging.Logger
. Even in Quarkus QE Test Suite, despite setting https://github.com/quarkus-qe/quarkus-test-suite/blob/331864b32bfd821b12e87d8919b54492078edbb9/pom.xml#L223 because that's a surefire, but we run almost all of the tests with the failsafe plugin.The LogManager accessed before the "java.util.logging.manager" system property was set to "org.jboss.logmanager.LogManager". Results may be unexpected.
ConsoleHandler
andFileHandler
java.util.logging.Logger
java.util.logging.manager
is indeed setorg.jboss.logmanager.LogManager
. It is specific for our FW, I cannot reproduce it with vanialla Quarkus. Invested few hours into it but it's waste of time. I don't care why for following reasons:quarkus-test-framework/quarkus-test-core/src/main/java/io/quarkus/test/logging/Log.java
Line 117 in 855fe3c
java.util.logging.Logger
What issue do we have:
quarkus-test-framework/quarkus-test-core/src/main/java/io/quarkus/test/logging/Log.java
Line 53 in 855fe3c
io.quarkus.bootstrap.logging.QuarkusDelayedHandler
andorg.jboss.logmanager.handlers.ConsoleHandler
are logging console output.io.quarkus.bootstrap.logging.QuarkusDelayedHandler
doesn't seem to be present in other casesWhat has changed:
jboss-logmanager
quarkusio/quarkus#33318 because 3.2 is not affected (I run tests, couldn't reproduce it so far)Proposed solution:
io.quarkus.bootstrap.logging.QuarkusDelayedHandler
handlerjava.util.logging.manager
as we know it's not going to be thereio.quarkus.bootstrap.logging.QuarkusDelayedHandler
is not in place when thejava.util.logging.manager
is not set to theorg.jboss.logmanager.LogManager
because it is only added here https://github.com/quarkusio/quarkus/blob/089dafbed78b0f1124a97e9cd87a60a05304477e/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/InitialConfigurator.java#L56 which is Jboss Log Manager specific contextThis PR is backwards compatible and it will fix log duplications even if we don't use Jboss Log Manager.
Please check the relevant options
run tests
phrase in comment)Checklist: