title: Changing the Log4Net Root Level When App is built as Release
body: <p>I have a project I am working on using log4net, and it works great, but I want to know if i can override the XML configuration for the root "level" attribute for the logging when in debug and release.</p>
  
  <p>Currently my root configuration looks like:</p>
  
  <pre><code>&lt;root&gt;
    &lt;level value="WARN"/&gt;
    &lt;appender-ref ref="LogFileAppender"/&gt;
    &lt;appender-ref ref="DebugAppender"/&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>And in my web applications Global.asax class, I was thinking I could wrap something in a </p>
  
  <pre><code>protected override void Application_Start(object sender, EventArgs e) {
    base.Application_Start(sender, e);
    XmlConfigurator.Configure();
  
    #if DEBUG
    //Change logging level to DEBUG
    #endif
  }
  </code></pre>
  
  <p>To change the root logging level to debug when the solution is built in debug.</p>
  
  <p>Is this possible, is my idea a best-practises type soltuion to what I want, and how would I do it (or how would you do it better)? </p>