Sbt “如何修复”;SLF4J:类路径包含多个SLF4J绑定;在Play 2.3.x启动时?

Sbt “如何修复”;SLF4J:类路径包含多个SLF4J绑定;在Play 2.3.x启动时?,sbt,slf4j,playframework-2.3,Sbt,Slf4j,Playframework 2.3,我升级了Play和其他库的版本,现在看到了以下内容: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/paul/.ivy2/cache/org.slf4j/slf4j-nop/jars/slf4j-nop-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [ja

我升级了Play和其他库的版本,现在看到了以下内容:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/paul/.ivy2/cache/org.slf4j/slf4j-nop/jars/slf4j-nop-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/paul/.ivy2/cache/org.slf4j/slf4j-jdk14/jars/slf4j-jdk14-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/paul/.ivy2/cache/org.slf4j/slf4j-simple/jars/slf4j-simple-1.7.7.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.slf4j.helpers.NOPLoggerFactory]
我正试图找出它们的来源,但当我运行
show managed classpath
时,只有slf4j JAR是

/home/paul/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.6.jar
/home/paul/.ivy2/cache/org.slf4j/jul-to-slf4j/jars/jul-to-slf4j-1.7.6.ja
/home/paul/.ivy2/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.7.6.jar
我从未见过
slf4j-nop-1.7.7.jar
slf4j-jdk14-1.7.7.jar
slf4j-simple-1.7.7.jar


这些在类路径上是如何的?

根据我可以提出的意见和可能的解决方案,我可以将它们包含在
build.sbt
中,供无修复版本的用户使用,例如Play 2.3.2:

libraryDependencies ++= Seq(
  "org.slf4j" % "slf4j-api"       % "1.7.7",
  "org.slf4j" % "jcl-over-slf4j"  % "1.7.7"
).map(_.force())

libraryDependencies ~= { _.map(_.exclude("org.slf4j", "slf4j-jdk14")) }
之前:

--- (Running the application from SBT, auto-reloading is enabled) ---

[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/jacek/.ivy2/cache/org.slf4j/slf4j-nop/jars/slf4j-nop-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/jacek/.ivy2/cache/org.slf4j/slf4j-jdk14/jars/slf4j-jdk14-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/jacek/.ivy2/cache/org.slf4j/slf4j-simple/jars/slf4j-simple-1.7.7.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.slf4j.helpers.NOPLoggerFactory]
[info] play - Application started (Dev)
之后(随更改):

这些是项目的依赖项:

$show libraryDependencies
[信息]列表(org.scala lang:scala library:2.11.2,com.typesafe.play:twirl api:1.0.2,com.typesafe.play:play-test:2.3.2:test,com.typesafe.play:play文档:2.3.2:docs,com.typesafe.play:play jdbc:2.3.2,com.typesafe.play:anrom:2.3.2,com.typesafe.play:play缓存:2.3.2,com.typesafe.play:play-ws:2.3.2,helplay:toers:2.3.2,org.webjars:webjars play:2.3.0,org.webjars:requirejs:2.1.14-1,org.webjars:下划线js:1.6.0-3,org.webjars:jquery:2.1.1,org.webjars:bootstrap:3.2.0,org.webjars:angularjs:1.3.0-beta.17,org.postgresql:postgresql:9.3-1102-jdbc41,org.slf4j:slf4j:1.7,org.slf4j:f47)

这是一个已知问题(已在问题跟踪程序中存档)。@applicius您能给我们发送一个链接吗?
--- (Running the application from SBT, auto-reloading is enabled) ---

[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)

[info] play - Application started (Dev)