-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add a Jackson-based Java properties configuration factory #2170
Conversation
That workaround is a critical component for getting log4j v1 users to easily upgrade their configurations though. |
I believe you are referring to this If I understand correctly, |
@ppkarwasz, I am puzzled. I was expecting to see some code removed too. Are we adding a 2nd
@jvz, even though you are right in theory, I would say it was more of a convenience for HBase, where they, in the past, made this convention get deployed during installation, and now they don't have control over those user-crafted files anymore, and hence they strive to support it. (LOG4J2-3341 contains the details.) I recall no other either a complaint for the absence of this feature, or a praise for the presence of it. Though all these don't make your remark less valid. We can indeed try to support it in |
@vy, This is more of a PoC. If you like it, I can remove/move |
I suppose it's not a blocker. |
I think the Builder API and |
@vy, It is done, now we have two properties configuration factory modules:
For dropping Remark: I removed the |
The `Properties` node must traditionally be the first node in the configuration. In order to support formats without a predefined order, we remove this condition and do a search for a `Properties` node instead.
The old properties configuration prevents the new one from having the same configuration factory order. This commit moves it to a new `log4j-config-properties-legacy` module.
234b9c5
to
f8632da
Compare
Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
This was actually merged in ec93d18 I deleted the upstream branch too fast (again) for Github to detect the merge. |
This PR introduces a new
JavaPropsConfigurationFactory
, based onjackson-dataformat-properties
.In the future this factory might replace the old
PropertiesConfigurationFactory
based on the Builder API.Pros
Cons
PropertiesConfigurationFactory
, e.g.:users need to use the usual way to configure loggers or the undocumented
levelAndRefs
attribute: