Slf4j: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Java")
 
No edit summary
Line 2: Line 2:


* [[Java#Libraries|Java]]
* [[Java#Libraries|Java]]
=Troubleshooting=
==Multiple SLF4J Bindings==
If the classpath contains two or more JARs with SLF4J bindings, we get this:
<pre>
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/ovidiu/runtime/os-stats-1.0.1-SNAPSHOT-6/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/ovidiu/runtime/jboss-eap-6.4.6/modules/system/layers/base/org/slf4j/impl/main/slf4j-jboss-logmanager-1.0.3.GA-redhat-1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
</pre>
The solution is to leave only one.

Revision as of 05:02, 4 September 2016

Internal

Troubleshooting

Multiple SLF4J Bindings

If the classpath contains two or more JARs with SLF4J bindings, we get this:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/ovidiu/runtime/os-stats-1.0.1-SNAPSHOT-6/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/ovidiu/runtime/jboss-eap-6.4.6/modules/system/layers/base/org/slf4j/impl/main/slf4j-jboss-logmanager-1.0.3.GA-redhat-1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

The solution is to leave only one.