Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2119

log4j-core do not include log4j-api

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.9.1
    • Fix Version/s: None
    • Component/s: API
    • Labels:
      None
    • Environment:

      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.

        Attachments

        1. test.zip
          2 kB
          Ralph Goers

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              striderapache dennis lucero
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: