centic9 opened a new issue, #3196:
URL: https://github.com/apache/logging-log4j2/issues/3196

   ## Description
   
   When upgrading log4j-api to 2.24.1 while still using log4j-core 2.24.0, 
`LogManager.getLogger()` returns `null`.
   
   This seems to be caused by changes to `LoggerRegistry` in log4j-api.
   
   This version-mismatch happens easily if a library like Apache POI upgrades 
"api" to the latest version, but projects using it do not upgrade log4j-core 
along the way. This is likely a common situation as libraries should only 
depend on "api" and thus cannot enforce a newer version of "core".
   
   It's unexpected to run into such an incompatibility, especially in a minor 
bugfix-release of log4j.
   
   ## Configuration
   
   **Version:** api 2.24.1, core 2.24.0
   
   **Operating system:** Linux
   
   **JDK:** JDK 11 + 17
   
   ## Logs
   
   Code is simply
   
   ```
   public static final Logger LOG = LogManager.getLogger(Class.class);
   ```
   
   This later triggers a NullPointerExceptions as LOG is null.
   
   ## Reproduction
   
   Run `./gradlew runWriteFile -PpoiVersion=5.4.0` in a checkout of 
https://github.com/centic9/poi-reproduce
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to