Skip to content

Concrete should not depend on specific SLF4J backends #6

@reckart

Description

@reckart

Concrete should not depend on specific SLF4J backends. As a library, concrete should only depend on the SLF4J API, but not on any specific implementations such as LOG4J. The actual backend should be chosen by the user of the the library, i.e. the person that builds an application using concrete.

Having a re-usable library depend on a SLF4J backends introduces a high risk of ending up with multiple backends on the classpath when the library is being used within an application.

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/.../.m2/repository-ukp/org/apache/logging/log4j/log4j-slf4j-impl/2.5/log4j-slf4j-impl-2.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/.../.m2/repository-ukp/org/slf4j/slf4j-log4j12/1.7.21/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Concretely affected (sorry!) are

  • concrete-safe 4.10.0
  • concrete-util 4.10.0
  • maybe others ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions