Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBoss logging does not route directly to SLF4J when using Logback #33155

Closed
wilkinsona opened this issue Nov 14, 2022 · 1 comment
Closed

JBoss logging does not route directly to SLF4J when using Logback #33155

wilkinsona opened this issue Nov 14, 2022 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

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.

@wilkinsona 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
@wilkinsona wilkinsona added the type: bug A general bug label Nov 14, 2022
@wilkinsona wilkinsona added this to the 3.0.x milestone Nov 14, 2022
@wilkinsona wilkinsona self-assigned this Nov 14, 2022
@wilkinsona wilkinsona modified the milestones: 3.0.x, 3.0.0 Nov 14, 2022
@wilkinsona
Copy link
Member Author

wilkinsona commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant