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

Split off XML configuration into its own module or internal package #2383

Open
ppkarwasz opened this issue Mar 15, 2024 · 1 comment
Open

Comments

@ppkarwasz
Copy link
Contributor

Since java.xml is an optional module in Log4j Core 3.x, we need to protect the users from linkage errors like the one reported in LOG4J2-3681.

I see two way to do it:

The first solution seems a little bit drastic to me: most users will have java.xml or they will not care about JPMS at all.

Regarding the second one, as far as I know the only way to access optional dependencies that is compatible with all JVMs is to access the implementation via reflection. We might as well move the configuration factory to an internal package and leave only a public facade.

@vy
Copy link
Member

vy commented Mar 20, 2024

I would be in favor of creating a new log4j-config-xml module. A very big part of our users use log4j2.yaml and log4j2.properties. When they migrate to Log4j 3, they will discover log4j-config-* anyway. It is not an embarrassing design detail, but a conscious decision. Let's rejoice at it. 😻

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

No branches or pull requests

2 participants