logging-log4j2
logging-log4j2 copied to clipboard
Fix handling of `LoggerContextAware` lookups
Due to the changes in #2278 LoggerContextAware lookups stopped working in 2.23.0.
This PR:
- fixes the NPE in
Interpolatorthat occurs ifInterpolator#setLoggerContextwas not called after instantiation. - Calls
Interpolator#setConfigurationandInterpolator#setLoggerContextwherever it is possible. - Changes the way
InterpolatorpropagatesConfigurationandLoggerContextto child lookups. Previously this occurred at each evaluation, now it occurs only in the setters.
Closes #2309.
@ppkarwasz, thanks for considering me for the review. Unfortunately I am not much familiar with the parts you touch, hence I doubt if my review will be meaningful. I trust your judgement and suggest to proceed as you wish.