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

[MS23] Native Compilation Support #3 #2832

Closed
2 tasks done
ppkarwasz opened this issue Aug 12, 2024 · 3 comments
Closed
2 tasks done

[MS23] Native Compilation Support #3 #2832

ppkarwasz opened this issue Aug 12, 2024 · 3 comments
Labels
android graalvm Issue related to GraalVM support STF-Milestones Milestones funded by the Sovereign Tech Fund

Comments

@ppkarwasz
Copy link
Contributor

ppkarwasz commented Aug 12, 2024

This is the third milestone, after #2831, devoted to fixing GraalVM support in Log4j.

Tasks

  • Fix GraalVM support in log4j-json-template-layout.

Additional tasks

Since the main was achieved in the previous #2831 milestone, we profit from the occasion to complete the following tasks:

@ppkarwasz ppkarwasz added the STF-Milestones Milestones funded by the Sovereign Tech Fund label Aug 12, 2024
@ppkarwasz ppkarwasz added the graalvm Issue related to GraalVM support label Aug 14, 2024
ppkarwasz added a commit that referenced this issue Oct 9, 2024
This fixes three issues encountered in the [`log4j-samples-android`](https://github.com/apache/logging-log4j-samples/tree/main/log4j-samples-android) test project:

1. Disables the `jvmrunargs` lookup on Android and fixes it on the other platforms. Previously, the lookup always returned `null`.
2. Switches the default context selector to `BasicContextSelector` on Android. `StackLocator` is broken on Android: it cannot use our JDK 8 code (missing `sun.reflect` classes), but also it cannot use our JDK 11+ code (missing multi-release JAR support). This causes `ClassLoaderContextSelector` to use two different logger contexts for the same classloader.
3. Fixes a `ParserConfigurationException` caused by the lack of XInclude capabilities in Android's XML parser. The fix to [LOG4J2-3531](https://issues.apache.org/jira/browse/LOG4J2-3531) didn't cover all the cases.

Closes #3056.
Part of #2832.
ppkarwasz added a commit that referenced this issue Oct 10, 2024
This fixes three issues encountered in the [`log4j-samples-android`](https://github.com/apache/logging-log4j-samples/tree/main/log4j-samples-android) test project:

1. Disables the `jvmrunargs` lookup on Android and fixes it on the other platforms. Previously, the lookup always returned `null`.
2. Switches the default context selector to `BasicContextSelector` on Android. `StackLocator` is broken on Android: it cannot use our JDK 8 code (missing `sun.reflect` classes), but also it cannot use our JDK 11+ code (missing multi-release JAR support). This causes `ClassLoaderContextSelector` to use two different logger contexts for the same classloader.
3. Fixes a `ParserConfigurationException` caused by the lack of XInclude capabilities in Android's XML parser. The fix to [LOG4J2-3531](https://issues.apache.org/jira/browse/LOG4J2-3531) didn't cover all the cases.

Closes #3056.
Part of #2832.
@ppkarwasz
Copy link
Contributor Author

ppkarwasz commented Oct 16, 2024

To ensure that each Log4j release will be compatible with Android and all the other platforms we support (JPMS/JLink, GraalVM, OSGi) the following steps were taken:

ppkarwasz added a commit that referenced this issue Oct 16, 2024
This fixes three issues encountered in the [`log4j-samples-android`](https://github.com/apache/logging-log4j-samples/tree/main/log4j-samples-android) test project:

1. Disables the `jvmrunargs` lookup on Android and fixes it on the other platforms. Previously, the lookup always returned `null`.
2. Switches the default context selector to `BasicContextSelector` on Android. `StackLocator` is broken on Android: it cannot use our JDK 8 code (missing `sun.reflect` classes), but also it cannot use our JDK 11+ code (missing multi-release JAR support). This causes `ClassLoaderContextSelector` to use two different logger contexts for the same classloader.
3. Fixes a `ParserConfigurationException` caused by the lack of XInclude capabilities in Android's XML parser. The fix to [LOG4J2-3531](https://issues.apache.org/jira/browse/LOG4J2-3531) didn't cover all the cases.

Closes #3056.
Part of #2832.
@ppkarwasz
Copy link
Contributor Author

In #3105, apache/logging-parent#270 and apache/logging-parent#271 we automate further the integration tests workflow: now no Release Manager can forget about it, because it starts automatically.

@grobmeier
Copy link
Member

Thanks for the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android graalvm Issue related to GraalVM support STF-Milestones Milestones funded by the Sovereign Tech Fund
Projects
None yet
Development

No branches or pull requests

2 participants