-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoggerContextAware
lookups fail in log4j2 2.23.0
#2309
Comments
ppkarwasz
added
the
bug
Incorrect, unexpected, or unintended behavior of existing code
label
Feb 22, 2024
It seems that the PR in the link has already been merged, so it might not be exactly the same issue, but can you explain what might be causing the problem that's occurring? |
ppkarwasz
added a commit
that referenced
this issue
Feb 22, 2024
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
changed the title
Failure of Spring properties configuration in log4j2 2.23.0
Feb 22, 2024
LoggerContextAware
lookups fail in log4j2 2.23.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
After updating to log4j2 version 2.23.0 while using Spring Boot 3.2.2, all settings that use Spring properties fail.
It all worked fine in versions prior to 2.21.1.
Is this an intended change, or is it a bug?
Configuration
Version: 2.23.0
Operating system: mac
JDK: jdk 21
Logs
Reproduction
The text was updated successfully, but these errors were encountered: