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.
Comment From: wilkinsona
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.