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

Add Support for SLF4J 2.0

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.17.1
    • 2.19.0
    • SLF4J Bridge
    • None
    • Important

    Description

      The SLF4J Bridge (log4j-slf4j18-impl:2.17.1) is currently broken as it contains the same typo bug of SLF4J-API which was fixed in SLF4J-API 2.0.0-alpha3 and therefore leads to an API mismatch error. In the org.apache.logging.slf4j.SLF4JServiceProvider, the getRequesteApiVersion-Method need to be refactored to getRequestedApiVersion.

      See the Changelog of SLF4J-API 2.0.0-alpha3: 

      • The getRequesteApiVersion method in SLF4JServiceProvider was renamed as getRequestedApiVersion. This fixes SLF4J-516.

      This leads to the following exception during the use of log4j-slf4j18-impl:2.17.1 with the current SLF4J-API:

      Unexpected problem occured during version sanity check
      Reported exception:
      java.lang.AbstractMethodError: Receiver class org.apache.logging.slf4j.SLF4JServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider.
          at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:297)

      Attachments

        Issue Links

          Activity

            People

              pkarwasz Piotr Karwasz
              thoebert Timon H.
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified