title: Why is Grails (in Tomcat) logging to both catalina.out and my custom file appender?
body: <p>I have the following for my log4j DSL configuration in Grails 1.2:</p>
  
  <pre><code>log4j = {
      appenders {
          console name: 'stdout', layout: pattern(conversionPattern: conversionPattern)
  
          environments {
              production {
                  // ... some code to determine file path ...
  
                  rollingFile name: 'file', file: "${logDirectory}/${appName}.log", layout: pattern(conversionPattern: conversionPattern)
                  rollingFile name: 'StackTrace', file: "${logDirectory}/${appName}-stacktrace.log"
          }
      }
  
      environments {
          development { root { warn 'stdout' } }
          test { root { warn 'stdout' } }
          production { root { error 'file' } }
      }
  
      // ... package-specific logging configurations ...
  }
  </code></pre>
  
  <p>When I deploy as a war to Tomcat, my logs get written to both catalina.out and my 'file' logger defined for production.</p>
  
  <p>I've tried:</p>
  
  <ul>
  <li>adding <code>additivity = false</code> to the <code>root {}</code> definition for <code>production {}</code>, which doesn't work (and I wouldn't really expect it to, since it's apparently setting additivity for the root logger itself?).</li>
  <li>defining the 'stdout' console appender inside of a <code>development {}</code> and <code>test {}</code> block within the <code>appenders {}</code> closure, but that doesn't work either.</li>
  </ul>
  
  <p>Perhaps this is an issue with my Tomcat configuration and not my log4j DSL? The closest I've come to finding someone with a similar issue is <a href="http://n4.nabble.com/log4j-additivity-DSL-Grails-1-1-td1383642.html" rel="noreferrer">this mailing-list thread</a>, for which there was no (simple) solution.</p>
  
  <p><strong>How can I prevent logs from being written to catalina.out in production?</strong></p>