title: log4net configuration for a given class not working
body: <pre><code>namespace Com.Foo
  {
      public class Bar
      {
  
          private static readonly ILog log = LogManager.GetLogger(typeof(Bar));
  
          public void DoIt()
          {
              log.Info("Did it again!");
          }
      }
  }
  
  class Program
  {
      private static readonly ILog log = LogManager.GetLogger(typeof(Program));
      static void Main(string[] args)
      {
          string sfile = @"C:\development\Framework\Logging\ConsoleApplication1\app.config";
          XmlConfigurator.Configure(new System.IO.FileInfo(sfile));
          log.Info("Entering application.");
          Bar bar = new Bar();
          bar.DoIt();
          log.Info("Exiting application.");
  
          Console.ReadLine();
      }
  
  
  }
  </code></pre>
  
  <p>My log4net configuration looks as follows:</p>
  
  <pre><code>&lt;!-- A1 is set to be a ConsoleAppender --&gt;
  &lt;appender name="A1" type="log4net.Appender.ConsoleAppender"&gt;
  
    &lt;!-- A1 uses PatternLayout --&gt;
    &lt;layout type="log4net.Layout.PatternLayout"&gt;
      &lt;conversionPattern value="%-4timestamp [%thread] %-5level %logger %ndc - %message%newline" /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;!-- Set root logger level to DEBUG and its only appender to A1 --&gt;
  &lt;root&gt;
    &lt;level value="DEBUG" /&gt;
    &lt;appender-ref ref="A1" /&gt;
  &lt;/root&gt;
  
  
  &lt;!-- Print only messages of level WARN or above in the package Com.Foo --&gt;
  &lt;logger name="Com.Foo"&gt;
    &lt;level value="WARN" /&gt;
  &lt;/logger&gt;
  </code></pre>
  
  <p>The output of my application still shows log from Com.Foo</p>
  
  <p>67   [10] INFO  ConsoleApplication1.Program (null) - Entering application.</p>
  
  <p><strong>100  [10] INFO  ConsoleApplication1.Com.Foo.Bar (null) - Did it again!</strong></p>
  
  <p>100  [10] INFO  ConsoleApplication1.Program (null) - Exiting application.</p>
  
  <p>How do I configure such that Com.Foo.Bar stops from showing up for WARN level? </p>
  
  <p>What am I missing?</p>
  
  <p>Thanks</p>