title: Grails logging configuration with different appenders
body: <p>This is my current log4j configuration. The problem is the development specific part.</p>
  
  <pre><code>log4j = {
      appenders {
          console name:'stdout',
                  threshold: org.apache.log4j.Level.ERROR
  
          rollingFile name: "appenderAccessLog",
   ...                    
          rollingFile name: "appenderAppLog",
      ...              
  
          environments {
              development{
                  rollingFile name: "appenderDebugLog",
                      threshold: org.apache.log4j.Level.DEBUG,
                      ....
              }
          }
  
      }
  
  
      error       'org.codehaus.groovy.grails.web.servlet',  //  controllers
                  'org.codehaus.groovy.grails.web.pages', //  GSP
                  'org.codehaus.groovy.grails.web.sitemesh', //  layouts
                  'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
                  'org.codehaus.groovy.grails.web.mapping', // URL mapping
                  'org.codehaus.groovy.grails.commons', // core / classloading
                  'org.codehaus.groovy.grails.plugins', // plugins
                  'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
                  'org.springframework',
                  'org.hibernate',
                  'net.sf.ehcache.hibernate'
  
  
  
      environments {
          production {
              // Override previous setting for 'grails.app.controller'
              root {
                  error 'appenderAppLog','stdout'
                  additivity = false
              }
  
          }              
                    debug additivity: false, stdout :['mycompany',
                       'mycompany.security',
                       'mycompany.common',
                       'grails.app.services.mycompany.services']
  
              debug additivity: false, appenderDebugLog :['mycompany',
                  'mycompany.security',
                  'mycompany.common',
                  'grails.app.services.mycompany.services']
  
              root {
                  error 'appenderAppLog','stdout'
                  additivity = true
              }
  </code></pre>
  
  <p>Now above you see 2 debug statements with specific package redirections to appenders.
  Now if I want to use debug for package XXX and send to appender A and B i am forced to use above definition - its a repetition of  debugg appender1: XXX and debug appender2: XXX package.</p>
  
  <p>I checked the grails log - Ideally the below should work to resolve the additional debug/appender statements:
                          error org.springframework</p>
  
  <pre><code>                    debug mycompany.packagenames...
  
          root {
              error 'appenderAppLog','stdout'
                              debug 'appenderDebugLog', 'stdout'
              additivity = true
          }
  </code></pre>
  
  <p>But what actually happens when I do that is all the packages listed in error category - start sending the debug messages  to the appenderDebugLog file. When I have explicitly stated different packages when defining each level as in the top - why should the debug configuration in the Root appender create this issue?.</p>
  
  <p>Please guide.</p>