title: How do disable log4j plugin in grails?
body: <p>It appears the <strong>Grails 2.1 log4j plugin</strong> resets the log4j configuration during initialization of the grails application (see stack trace below).</p>
  
  <pre><code>    at org.apache.log4j.LogManager.resetConfiguration(LogManager.java:233)
      at org.apache.log4j.LogManager$resetConfiguration.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
      at org.codehaus.groovy.grails.plugins.log4j.Log4jConfig.initialize(Log4jConfig.groovy:66)
      at org.codehaus.groovy.grails.plugins.log4j.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:48)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4389)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:313)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)
  </code></pre>
  
  <p><strong>Is there any way to disable this "feature" or to remove this plugin altogether?</strong></p>
  
  <p>My JBoss server is already configured through jboss-log4j.xml and I do not want grails to make any changes to the configuration. I have already tried removing the <code>log4j</code> section of Config.groovy, but doing so had no effect.</p>
  
  <p>As Kelly suggested, I have already removed all logging-related jars from my war file. Log4j classes are provided by JBoss.</p>
  
  <p><strong>EDIT</strong> I also tried the trick described in <a href="https://stackoverflow.com/a/1190438/539048">https://stackoverflow.com/a/1190438/539048</a> but that didn't seem to make any difference.</p>