ramanathan1504 opened a new pull request, #4142: URL: https://github.com/apache/logging-log4j2/pull/4142
Fixes #4024 ### Summary This PR fixes a bug where custom logger-level properties (e.g., `logger.log4j.property.type = Property`) were silently ignored and dropped when configuring Log4j 2 using a `.properties` file. ### Changes * **Enabled Nested Parsing:** Passed logger, root logger, appender, and filter builders through `processRemainingProperties` to recursively parse nested custom properties. * **Prefix-Flattening Logic:** Added a prefix-flattening loop in `createLogger` and `createAppender` to correctly resolve names and flatten nested keys for dotted prefixes. * **Duplicate Discarding:** Updated parsing loops to return `null` and safely ignore invalid duplicate nameless configurations created by Log4j's dot-split prefix partitioning. * **Bypassed Empty Keys & Cleanup:** Updated `processRemainingProperties` to safely bypass empty property names (`""`) and added loops to clear processed `"appenderRef"` and `"filter"` keys to prevent duplicate parsing. ### Verification * Updated `PropertiesConfigurationTest#testPropertiesConfiguration` to verify that custom properties are successfully loaded on both root and custom loggers. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
