You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When log4j-to-slf4j is on the classpath, JBoss Logging uses org.jboss.logging.Log4j2LoggerProvider on the JVM. This means that the log routing is JBoss Logging -> Log4j2 API -> SLF4J -> Logback. In a native image, Log4j2 fails and org.jboss.logging.JDKLoggerProvider is used instead. This means that the log routing is JBoss Logging -> JDK -> SLF4J -> Logback. In both cases, the routing is less efficient than it could be as JBoss Logging could route straight into SLF4J rather than going through Log4j2 API or JDK logging. Routing directly to SLF4J will require us to set the org.jboss.logging.provider system property to SLF4J. In a native image, it will also require reflection metadata for org.slf4j.spi.LocationAwareLogger.
The text was updated successfully, but these errors were encountered:
wilkinsona
changed the title
JBoss logging uses different logging providers on the JVM and in a native image
JBoss logging does not route directly to SLF4J when using Logback
Nov 14, 2022
The changes here have addressed the inefficient routing on the JVM. For that to also work in a native image, some reachability metadata for JBoss Logging will be contributed by this PR.
When log4j-to-slf4j is on the classpath, JBoss Logging uses
org.jboss.logging.Log4j2LoggerProvider
on the JVM. This means that the log routing isJBoss Logging -> Log4j2 API -> SLF4J -> Logback
. In a native image, Log4j2 fails andorg.jboss.logging.JDKLoggerProvider
is used instead. This means that the log routing isJBoss Logging -> JDK -> SLF4J -> Logback
. In both cases, the routing is less efficient than it could be as JBoss Logging could route straight into SLF4J rather than going through Log4j2 API or JDK logging. Routing directly to SLF4J will require us to set theorg.jboss.logging.provider
system property toSLF4J
. In a native image, it will also require reflection metadata fororg.slf4j.spi.LocationAwareLogger
.The text was updated successfully, but these errors were encountered: