Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Cannot Reproduce
-
2.9.1
-
None
-
None
-
Simple Tomcat Spring Application
Description
When upgraded from log4j-core 2.8.2 or 2.9.0 to 2.9.1 logging stops working.
I have noticed this because of using spring-jcl (new component since spring 5 to sanitize logging) which cannot discover log4j2 because of missing class org.apache.logging.log4j.spi.ExtendedLogger which is part of API jar.
To reproduce this create simple maven-war aplication and add following to pom.xml:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.9.1</version>
</dependency>
then run mvn package to assemble that war and inspect WEB-INF/lib. You will see that log4j-api is missing.
This might be connected with following issue: LOG4J2-2084
PS
I'm not sure why it missing since log4j-core pom.xml seems to have log4j-api dependency.