Add clean-history-on-start and total-size-cap rolling policy properties for Log4J2 - #51153
Add clean-history-on-start and total-size-cap rolling policy properties for Log4J2#51153elephant-y wants to merge 2 commits into
Conversation
…es for Log4j2 Add CLEAN_HISTORY_ON_START and TOTAL_SIZE_CAP to Log4j2's RollingPolicySystemProperty enum so that log4j2 users can configure these rolling policy settings via application properties, matching the existing support in logback's RollingPolicySystemProperty. See spring-projectsgh-46468 Signed-off-by: yangzhice <a13644015167@qq.com>
7e1fd78 to
688f494
Compare
|
Thanks for the PR but those should be tested if possible. Look at |
See spring-projectsgh-46468 Signed-off-by: yangzhice <a13644015167@qq.com>
Thanks for the review! I've added assertions for both CLEAN_HISTORY_ON_START and TOTAL_SIZE_CAP to the rollingPolicySystemPropertiesAreApplied test in Log4J2LoggingSystemTests. I also aligned CLEAN_HISTORY_ON_START to use String type (matching logback's approach) since the system property value is resolved as a string. Let me know if there's anything else to address. |
|
This PR only sets two system properties but these are not used anywhere. I have some code in the meantime that sort of implement what is expected but this makes |
No description provided.