title: How to exclude multiple SLF4J bindings to LOG4J
body: <p>I am getting the error </p>
  
  <pre><code>SLF4J: Class path contains multiple SLF4J bindings.
  SLF4J: Found binding in [jar:file:/C:/Users/george/.gradle/caches/artifacts-26/filestore/org.apache.logging.log4j/log4j-slf4j-impl/2.0-beta8/jar/15984318e95b9b0394e979e413a4a14f322401c1/log4j-slf4j-impl-2.0-beta8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: Found binding in [jar:file:/C:/Users/george/.gradle/caches/artifacts-26/filestore/org.slf4j/slf4j-log4j12/1.5.0/jar/aad1074d37a63f19fafedd272dc7830f0f41a977/slf4j-log4j12-1.5.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
  SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
  </code></pre>
  
  <p>In my build.gradle file I have the following line to include the jar log4j-slf4j-impl-2.0-beta8.jar (which I want to bind to LOG4J2)</p>
  
  <pre><code> compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.0-beta8' 
  </code></pre>
  
  <p>In another build.gradle file in a dependent project I have multiple lines similar to the following:</p>
  
  <pre><code> compile 'dcm4che:dcm4che-core:2.0.23'
  </code></pre>
  
  <p>Now dcm4che includes a dependency on log4j version 1 (slf4j-log4j12) and this is therefore being included in the overall project.</p>
  
  <p>Here is a snippet from the Gradle dependency tree:</p>
  
  <pre><code>|    +--- dcm4che:dcm4che-core:2.0.23
  |    |    \--- org.slf4j:slf4j-log4j12:1.5.0
  |    |         +--- org.slf4j:slf4j-api:1.5.0 -&gt; 1.7.5
  |    |         \--- log4j:log4j:1.2.13 -&gt; 1.2.14
  </code></pre>
  
  <p>I have read the link  <a href="http://www.slf4j.org/codes.html#multiple_bindings">suggested in the warning</a> but I cannnot figure out how to make my app bind to log4j2 using the jar  that I want.
  The Gradle documentation on dependency management has not really made it any clearer.</p>