Skip to content

Commit

Permalink
Switch to jboss-logmanager
Browse files Browse the repository at this point in the history
Drop the old `jboss-logmanager-embedded` in favor of `jboss-logmanager`.
  • Loading branch information
dmlloyd committed Jul 24, 2023
1 parent 9acf766 commit 2be7359
Show file tree
Hide file tree
Showing 31 changed files with 126 additions and 155 deletions.
27 changes: 10 additions & 17 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<dekorate.version>3.7.0</dekorate.version> <!-- Please check with Java Operator SDK team before updating -->
<maven-invoker.version>3.2.0</maven-invoker.version>
<awaitility.version>4.2.0</awaitility.version>
<jboss-logmanager.version>1.1.1</jboss-logmanager.version>
<jboss-logmanager.version>3.0.0.Final</jboss-logmanager.version>
<flyway.version>9.21.0</flyway.version>
<yasson.version>3.0.3</yasson.version>
<liquibase.version>4.20.0</liquibase.version>
Expand Down Expand Up @@ -3229,31 +3229,31 @@
<version>${commons-logging-jboss-logging.version}</version>
</dependency>
<dependency>
<!-- NOTE: this dependency exists in order to help users who are using the old GAV for logging -->
<!-- The version doesn't need to be a property since it will be locked at 1.2.0.Final forever -->
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<version>1.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<version>${jboss-logmanager.version}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.modules</groupId>
<artifactId>jboss-modules</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>jakarta.json</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>log4j2-jboss-logmanager</artifactId>
<version>${log4j2-jboss-logmanager.version}</version>
<exclusions>
<!-- we use the embedded version -->
<exclusion>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
While we are not affected by CVE-2021-4428 as we are only using the Log4j2 API,
Expand All @@ -3268,13 +3268,6 @@
<groupId>org.jboss.logmanager</groupId>
<artifactId>log4j-jboss-logmanager</artifactId>
<version>${log4j-jboss-logmanager.version}</version>
<exclusions>
<!-- we use the embedded version -->
<exclusion>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion core/builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.jboss.jandex.DotName;
import org.jboss.jandex.IndexView;
import org.jboss.logging.Logger;
import org.jboss.logmanager.EmbeddedConfigurator;
import org.jboss.logmanager.LogContextInitializer;
import org.jboss.logmanager.LogManager;
import org.objectweb.asm.Opcodes;

Expand Down Expand Up @@ -217,7 +217,7 @@ void miscSetup(
systemProp
.accept(new NativeImageSystemPropertyBuildItem("java.util.logging.manager", "org.jboss.logmanager.LogManager"));
provider.accept(
new ServiceProviderBuildItem(EmbeddedConfigurator.class.getName(), InitialConfigurator.class.getName()));
new ServiceProviderBuildItem(LogContextInitializer.class.getName(), InitialConfigurator.class.getName()));
}

@BuildStep
Expand Down
2 changes: 1 addition & 1 deletion core/processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
12 changes: 9 additions & 3 deletions core/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<artifactId>jboss-logmanager</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
Expand Down Expand Up @@ -148,7 +148,13 @@
</lesserPriorityArtifacts>
<parentFirstArtifacts>
<parentFirstArtifact>io.quarkus:quarkus-bootstrap-runner</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-constraint</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-cpu</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-expression</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-io</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-net</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-os</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-ref</parentFirstArtifact>
<parentFirstArtifact>org.wildfly.common:wildfly-common</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:graal-sdk</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.js:js</parentFirstArtifact>
Expand All @@ -162,7 +168,7 @@
<parentFirstArtifact>io.quarkus:quarkus-bootstrap-maven-resolver</parentFirstArtifact>
<parentFirstArtifact>org.slf4j:slf4j-api</parentFirstArtifact>
<parentFirstArtifact>org.jboss.slf4j:slf4j-jboss-logmanager</parentFirstArtifact>
<parentFirstArtifact>org.jboss.logmanager:jboss-logmanager-embedded</parentFirstArtifact>
<parentFirstArtifact>org.jboss.logmanager:jboss-logmanager</parentFirstArtifact>
<parentFirstArtifact>org.jboss.logging:jboss-logging</parentFirstArtifact>
<parentFirstArtifact>org.apache.maven:maven-model</parentFirstArtifact>
<parentFirstArtifact>org.apache.maven.resolver:maven-resolver-api</parentFirstArtifact>
Expand Down Expand Up @@ -208,7 +214,7 @@
<runnerParentFirstArtifact>io.quarkus:quarkus-development-mode-spi</runnerParentFirstArtifact>
<!-- logging dependencies always need to be loaded by the JDK ClassLoader -->
<runnerParentFirstArtifact>org.jboss.logging:jboss-logging</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.jboss.logmanager:jboss-logmanager-embedded</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.jboss.logmanager:jboss-logmanager</runnerParentFirstArtifact>
<!-- This is needed as it's a dependency of the JBoss Logging so it too needs to be loaded by the JDK ClassLoader -->
<runnerParentFirstArtifact>org.wildfly.common:wildfly-common</runnerParentFirstArtifact>
<!-- This is needed because it contains some jar handling classes -->
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
import java.util.logging.LogManager;
import java.util.logging.LogRecord;

import org.jboss.logmanager.EmbeddedConfigurator;
import org.jboss.logmanager.ExtFormatter;
import org.jboss.logmanager.LogContext;
import org.jboss.logmanager.LogContextInitializer;
import org.jboss.logmanager.Logger;
import org.jboss.logmanager.errormanager.OnlyOnceErrorManager;
import org.jboss.logmanager.filters.AllFilter;
import org.jboss.logmanager.formatters.ColorPatternFormatter;
import org.jboss.logmanager.formatters.PatternFormatter;
import org.jboss.logmanager.formatters.TextBannerFormatter;
import org.jboss.logmanager.handlers.AsyncHandler;
import org.jboss.logmanager.handlers.ConsoleHandler;
import org.jboss.logmanager.handlers.FileHandler;
Expand Down Expand Up @@ -266,7 +268,7 @@ public void accept(String categoryName, CategoryConfig config) {
}
addNamedHandlersToRootHandlers(config.handlers, namedHandlers, handlers, errorManager);
InitialConfigurator.DELAYED_HANDLER.setAutoFlush(false);
InitialConfigurator.DELAYED_HANDLER.setHandlers(handlers.toArray(EmbeddedConfigurator.NO_HANDLERS));
InitialConfigurator.DELAYED_HANDLER.setHandlers(handlers.toArray(LogContextInitializer.NO_HANDLERS));
return shutdownNotifier;
}

Expand Down Expand Up @@ -362,7 +364,7 @@ public static void initializeBuildTimeLogging(LogConfig config, LogBuildTimeConf
}
addNamedHandlersToRootHandlers(config.handlers, namedHandlers, handlers, errorManager);
InitialConfigurator.DELAYED_HANDLER.setAutoFlush(false);
InitialConfigurator.DELAYED_HANDLER.setBuildTimeHandlers(handlers.toArray(EmbeddedConfigurator.NO_HANDLERS));
InitialConfigurator.DELAYED_HANDLER.setBuildTimeHandlers(handlers.toArray(LogContextInitializer.NO_HANDLERS));
}

private boolean shouldCreateNamedHandlers(LogConfig logConfig,
Expand Down Expand Up @@ -556,21 +558,13 @@ private static Handler configureConsoleHandler(final ConsoleConfig config,
bannerSupplier = possibleBannerSupplier.getValue().get();
}
if (ColorSupport.isColorEnabled(consoleRuntimeConfig, config)) {
formatter = new ColorPatternFormatter(config.darken, config.format);
color = true;
ColorPatternFormatter colorPatternFormatter = new ColorPatternFormatter(config.darken,
config.format);
if (bannerSupplier != null) {
formatter = new BannerFormatter(colorPatternFormatter, true, bannerSupplier);
} else {
formatter = colorPatternFormatter;
}
} else {
PatternFormatter patternFormatter = new PatternFormatter(config.format);
if (bannerSupplier != null) {
formatter = new BannerFormatter(patternFormatter, false, bannerSupplier);
} else {
formatter = patternFormatter;
}
formatter = new PatternFormatter(config.format);
}
if (bannerSupplier != null) {
formatter = new TextBannerFormatter(bannerSupplier, ExtFormatter.wrap(formatter, false));
}
}
final ConsoleHandler consoleHandler = new ConsoleHandler(
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/class-loading-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ or a `LinkageError` can occur.
<parentFirstArtifacts>
<parentFirstArtifact>io.quarkus:quarkus-bootstrap-core</parentFirstArtifact>
<parentFirstArtifact>io.quarkus:quarkus-development-mode-spi</parentFirstArtifact>
<parentFirstArtifact>org.jboss.logmanager:jboss-logmanager-embedded</parentFirstArtifact>
<parentFirstArtifact>org.jboss.logmanager:jboss-logmanager</parentFirstArtifact>
<parentFirstArtifact>org.jboss.logging:jboss-logging</parentFirstArtifact>
<parentFirstArtifact>org.ow2.asm:asm</parentFirstArtifact>
</parentFirstArtifacts>
Expand Down
4 changes: 2 additions & 2 deletions extensions/datasource/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions extensions/devservices/db2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions extensions/devservices/derby/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<scope>test</scope>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions extensions/devservices/h2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<scope>test</scope>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions extensions/devservices/mariadb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<scope>test</scope>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions extensions/devservices/mssql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<scope>test</scope>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
6 changes: 3 additions & 3 deletions extensions/devservices/mysql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<scope>test</scope>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
Expand Down
2 changes: 1 addition & 1 deletion extensions/devservices/oracle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions extensions/devservices/postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager-embedded</artifactId>
<scope>test</scope>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
Loading

0 comments on commit 2be7359

Please sign in to comment.