Log4j 2
  1. Log4j 2
  2. LOG4J2-722

Commons Logging API classes missing from distribution

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: None
    • Labels:
      None

      Description

      The page Commons Logging Bridge mentions under Usage that...

      Simply add the bridge jar along with the other Log4j 2 jars and all logging done using the Commons Logging API will be routed to Log4j.

      ...and under Requirements only that...

      The Commons Logging Bridge requires at least Java 6 and is dependent on the Log4j 2 API.

      But this is actually not the case since the API classes from the package org.apache.commons.logging are not bundled within the bridge JAR.

      So currently the name log4j-jcl-2.0.jar is a misnomer and so the solution would be to either...

      • rename log4j-jcl-2.0.jar to log4j-jcl-impl-2.0.jar (following the example of log4j-slf4j-impl-2.0.jar) and distribute the commons-logging-api-1.x.jar along with the Log4J2 distribution (perhaps as log4j-jcl-api-2.0.jar)
      • package the necessary Commons Logging API classes directly into the log4j-jcl-2.0.jar

      The second solution is how SLF4J handles things, how the description page above describes things and how the SLF4J binding/bridge is supposed to work (see LOG4J2-723)

        Activity

        Holger Stenzhorn created issue -
        Holger Stenzhorn made changes -
        Field Original Value New Value
        Description The page [Commons Logging Bridge|http://logging.apache.org/log4j/2.x/log4j-jcl/index.html] mentions under *Usage* that...
        bq. Simply add the bridge jar along with the other Log4j 2 jars and all logging done using the Commons Logging API will be routed to Log4j.
        ...and under *Requirements* only that...
        bq. The Commons Logging Bridge requires at least Java 6 and is dependent on the Log4j 2 API.
        But this is actually not the case since the API classes from the package {{org.apache.commons.logging}} are not bundled within the bridge JAR.
        The page [Commons Logging Bridge|http://logging.apache.org/log4j/2.x/log4j-jcl/index.html] mentions under *Usage* that...
        bq. Simply add the bridge jar along with the other Log4j 2 jars and all logging done using the Commons Logging API will be routed to Log4j.
        ...and under *Requirements* only that...
        bq. The Commons Logging Bridge requires at least Java 6 and is dependent on the Log4j 2 API.
        But this is actually not the case since the API classes from the package {{org.apache.commons.logging}} are not bundled within the bridge JAR.
        (So currently the name {{log4j-jcl-2.0.jar}} is a misnomer and should actually be {{log4j-jcl-impl-2.0.jar}} following the example of {{log4j-slf4j-impl-2.0.jar}}.)
        Holger Stenzhorn made changes -
        Description The page [Commons Logging Bridge|http://logging.apache.org/log4j/2.x/log4j-jcl/index.html] mentions under *Usage* that...
        bq. Simply add the bridge jar along with the other Log4j 2 jars and all logging done using the Commons Logging API will be routed to Log4j.
        ...and under *Requirements* only that...
        bq. The Commons Logging Bridge requires at least Java 6 and is dependent on the Log4j 2 API.
        But this is actually not the case since the API classes from the package {{org.apache.commons.logging}} are not bundled within the bridge JAR.
        (So currently the name {{log4j-jcl-2.0.jar}} is a misnomer and should actually be {{log4j-jcl-impl-2.0.jar}} following the example of {{log4j-slf4j-impl-2.0.jar}}.)
        The page [Commons Logging Bridge|http://logging.apache.org/log4j/2.x/log4j-jcl/index.html] mentions under *Usage* that...
        bq. Simply add the bridge jar along with the other Log4j 2 jars and all logging done using the Commons Logging API will be routed to Log4j.
        ...and under *Requirements* only that...
        bq. The Commons Logging Bridge requires at least Java 6 and is dependent on the Log4j 2 API.
        But this is actually not the case since the API classes from the package {{org.apache.commons.logging}} are not bundled within the bridge JAR.

        So currently the name {{log4j-jcl-2.0.jar}} is a misnomer and so the solution would be to either...
        * rename {{log4j-jcl-2.0.jar}} to {{log4j-jcl-impl-2.0.jar}} (following the example of {{log4j-slf4j-impl-2.0.jar}}) and distribute the {{commons-logging-api-1.x.jar}} along with the Log4J2 distribution (perhaps as log4j-jcl-api-2.0.jar)
        * package the necessary Commons Logging API classes directly into the {{log4j-jcl-2.0.jar}}

        The second solution is how SLF4J handles things, how the description page above describes things and how the SLF4J binding/bridge is supposed to work (see LOG4J2-723)
        Remko Popma made changes -
        Assignee Remko Popma [ remkop@yahoo.com ]
        Remko Popma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.2 [ 12327553 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Remko Popma
            Reporter:
            Holger Stenzhorn
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development