logging-log4j2 icon indicating copy to clipboard operation
logging-log4j2 copied to clipboard

Fix handling of `LoggerContextAware` lookups

Open ppkarwasz opened this issue 1 year ago • 1 comments

Due to the changes in #2278 LoggerContextAware lookups stopped working in 2.23.0.

This PR:

  • fixes the NPE in Interpolator that occurs if Interpolator#setLoggerContext was not called after instantiation.
  • Calls Interpolator#setConfiguration and Interpolator#setLoggerContext wherever it is possible.
  • Changes the way Interpolator propagates Configuration and LoggerContext to child lookups. Previously this occurred at each evaluation, now it occurs only in the setters.

Closes #2309.

ppkarwasz avatar Feb 22 '24 11:02 ppkarwasz

@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.

vy avatar Feb 23 '24 08:02 vy