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

Logback 1.4.9 reflect-config.json missing ContextInitializer #454

Closed
martijndwars opened this issue Feb 19, 2024 · 2 comments · Fixed by #458
Closed

Logback 1.4.9 reflect-config.json missing ContextInitializer #454

martijndwars opened this issue Feb 19, 2024 · 2 comments · Fixed by #458
Labels
bug Something isn't working

Comments

@martijndwars
Copy link
Member

Describe the bug
When using the reflect-config.json for Logback 1.4.9, no logs are seen on the console.

To Reproduce
See attached logback-native.zip.

mvn clean install
native-image -jar target/logback-native-0.1-SNAPSHOT.jar
./logback-native-0.1-SNAPSHOT

Expected behavior
See log output on the console.

Additional context
reflect-config.json loads the following two classes if ch.qos.logback.classic.util.ContextInitializer is reachable:

  • ch.qos.logback.classic.util.DefaultJoranConfigurator
  • ch.qos.logback.classic.joran.SerializedModelConfigurator

However, according to the ContextInitializer.java sources ch.qos.logback.classic.BasicConfigurator is also loaded reflectively, but this class is missing from the reflect-config. As such, the BasicConfigurator is never run, and some essential configuration is missing.

@martijndwars martijndwars added the bug Something isn't working label Feb 19, 2024
@martijndwars martijndwars changed the title Logback incorrect? Logback 1.4.9 reflect-config.json missing ContextInitializer? Feb 19, 2024
@martijndwars martijndwars changed the title Logback 1.4.9 reflect-config.json missing ContextInitializer? Logback 1.4.9 reflect-config.json missing ContextInitializer Feb 19, 2024
wilkinsona added a commit to wilkinsona/graalvm-reachability-metadata that referenced this issue Feb 23, 2024
@wilkinsona
Copy link
Contributor

#458 should fix this.

@martijndwars
Copy link
Member Author

Thank you @wilkinsona!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants