Fix createOnDemand for Rolling File Appender#4072
Fix createOnDemand for Rolling File Appender#4072ramanathan1504 wants to merge 4 commits intoapache:2.xfrom
createOnDemand for Rolling File Appender#4072Conversation
createOnDemand for Rolling File Appender
vy
left a comment
There was a problem hiding this comment.
Checked with @ppkarwasz, the fix looks good. Could you also add a changelog entry (referencing to both the Issue and PR IDs), please?
|
@ramanathan1504, if you can get this merged until next week, I can ship it with |
|
…r and add tests for createOnDemand behavior
236afb2 to
e7723f9
Compare
|
@ramanathan1504, please do NOT force-push. It truncates the entire conversation history and I cannot see what incremental changes you've pushed. That is, I need to re-review everything from scratch. |
@vy Thanks for the clarification. I will avoid force-pushing and will push incremental commits. |
…tion until the first log event change log moving from 2.6 to 2.x
Fixes #2006
PR Notes: RollingFile
createOnDemandvalidationScope
spring-boot-testonlycore-java-testandlog4j2-web-testleft unchangedWhat was run
2.26.0-SNAPSHOTartifacts resolved from~/.m2SpringBootTestApp#printLogPathStateused as source of truthResults (
2.26.0-SNAPSHOT)createOnDemand="true"(defaultlog4j2.xml)main-entry:dir=false app.log=false app-json.log=falseafter LogManager.getLogger:dir=false app.log=false app-json.log=falseafter first log event:dir=true app.log=true app-json.log=trueConclusion: directory and files are created on first log event (expected on-demand behavior).
createOnDemand="false"(log4j2-createOnDemand-false.xml)main-entry:dir=false app.log=false app-json.log=falseafter LogManager.getLogger:dir=true app.log=true app-json.log=trueafter first log event:dir=true app.log=true app-json.log=trueConclusion: eager creation occurs before first log event (expected non-demand behavior).