Fix issue with 'springProperty' not loaded from context scope when initializing with 'playSaxEvents' in logback #35670
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
related issue : #35664
I fixed an issue that worked in boot 2.7 but has been happening since boot 3.x.
I think this issue was caused by the deletion of this line in this commit.
(And while I'm not entirely certain, I think this might also be due to the effects of updating logback to version 1.4.x)
[Causes and actions]
Looking at the
doConfigure(...)
function inch.qos.logback.core.joranGenericXMLConfigurator.java
, it works like this.In the current situation, the
processModel
is lagging behind, andbuildModelFromSaxEventList(...)
isn't loading thespringProperty
.Hence, I've injected
springProperty
into thecontext
using aSpringPropertyAction
, which is a part of the flow executed byplaySaxEvents(...)
.(Referring to the previously mentioned commit, it appears that initialization was done via
SpringPropertyAction
in the past.)Additional comments
I haven't given much thought to this revision, as I'm unaware of the historical context.
However, this issue has prevented me from upgrading the current project to boot 3.x.
It would be truly beneficial if this issue could be resolved.
I'm always using Spring-Boot well. Thank you for your efforts.