Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-540

Backward compatibility problem with 1.7.34 update

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.7.34
    • Implementations
    • None
    •  

       MacOS 12.1

      Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)

    • normal

    Description

      I have a maven build for which logging during tests used to work.

      Snippets from pom.xml:

      <properties>
          ...
          <slf4j.version>[1.7,1.8)</slf4j.version>
          ...
      </properties>
      ...
      <dependencies>
          <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
              <version>${slf4j.version}</version>
          </dependency>
          <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-log4j12</artifactId>
              <version>${slf4j.version}</version>
              <scope>test</scope>
          </dependency>
          ...
      <dependencies>
      

      Dependency tree snippet:

      [WARNING] The artifact org.slf4j:slf4j-log4j12:jar:1.7.34 has been relocated to org.slf4j:slf4j-reload4j:jar:1.7.34
      ...
      [INFO] +- org.slf4j:slf4j-api:jar:1.8.0-beta4:compile
      [INFO] +- org.slf4j:slf4j-reload4j:jar:1.7.34:test
      [INFO] |  \- ch.qos.reload4j:reload4j:jar:1.2.18.3:test
      

      Nothing has changed in my configuration, but after the 1.7.34 release, logging during tests no longer works and instead I see this:

      [INFO] -------------------------------------------------------
      [INFO]  T E S T S
      [INFO] -------------------------------------------------------
      [INFO] Running TestSuite
      SLF4J: No SLF4J providers were found.
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
      SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
      SLF4J: Ignoring binding found at [jar:file:/Users/archie/.m2/repository/org/slf4j/slf4j-reload4j/1.7.34/slf4j-reload4j-1.7.34.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
      

      Is this backward-incompatibility expected?

      FYI I was able to workaround the issue with these changes:

      -        <slf4j.version>[1.7,1.8)</slf4j.version>
      +        <slf4j.version>1.7.34</slf4j.version>
          ...
      -            <artifactId>slf4j-log4j12</artifactId>
      +            <artifactId>slf4j-reload4j</artifactId>
       

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            archie Archie Cobbs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: