title: Grails: Replace log4j with logback
body: <p>I am trying to replace log4j in my Grails app with logback but am always getting a </p>
  
  <pre><code>Embedded error: java.lang.reflect.InvocationTargetException
  org.apache.log4j.LogManager
  </code></pre>
  
  <p>when running <em>run-app</em> or <em>test-app</em>.</p>
  
  <p>I have included the following in <em>BuildConfig.groovy</em> which I thought is enough:</p>
  
  <pre><code>inherits("global") {
      excludes "slf4j-log4j12"
  }
  
  [...]
  
  dependencies {
      build 'ch.qos.logback:logback-core:0.9.29', 'ch.qos.logback:logback-classic:0.9.29'
      runtime 'ch.qos.logback:logback-core:0.9.29', 'ch.qos.logback:logback-classic:0.9.29'
  }
  </code></pre>
  
  <p>I cannot find any more references to Log4J and have no idea where this call comes from?!</p>
  
  <p>I am also trying replace Grails slf 1.5.8 by 1.6.2 and get the following in the console despite having excluded slf from all Grails modules:</p>
  
  <pre><code>SLF4J: The requested version 1.6 by your slf4j binding is not compatible with [1.5.5, 1.5.6, 1.5.7, 1.5.8]
  SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
  </code></pre>
  
  <p>Thanks in advance for any help</p>
  
  <p>Regards,</p>
  
  <p>Jonas</p>