title: log4net hierarchy and logging levels
body: <p><a href="http://logging.apache.org/log4net/release/manual/introduction.html" rel="noreferrer">This site</a> says</p>
  
  <blockquote>
    <p>Loggers may be assigned levels. Levels are instances of the log4net.Core.Level class. The following levels are defined in order of <strong>increasing priority</strong>:</p>
    
    <ul>
    <li>ALL</li>
    <li>DEBUG</li>
    <li>INFO</li>
    <li>WARN</li>
    <li>ERROR</li>
    <li>FATAL</li>
    <li>OFF</li>
    </ul>
  </blockquote>
  
  <p>DEBUG seems to have lowest priority and ERROR is higher.</p>
  
  <p>Question</p>
  
  <ul>
  <li>If I set Min and Max example DEBUG and ERROR it prints everthing DEBUG, INFO, WARN and ERROR. Without use of min and max filter. If I specify ERROR (Logging level = ERROR) Will it include DEBUG, INFO &amp; WARN</li>
  </ul>
  
  <pre class="lang-xml prettyprint-override"><code> &lt;filter type="log4net.Filter.LevelRangeFilter"&gt;
       &lt;param name="LevelMin" value="ERROR"/&gt;
       &lt;param name="LevelMax" value="ERROR"/&gt;
   &lt;/filter&gt;
  </code></pre>
  
  <p>Instead of min and max filter. Is it possible to configure a level and include all other levels below it for logging.</p>
  
  <p>Example - Set level as Error it will include DEBUG, INFO, WARN and ERROR. Is this possible with log4net?</p>
  
  <p>Posting log4net config based on one of comments:</p>
  
  <pre class="lang-xml prettyprint-override"><code>     &lt;?xml version="1.0" encoding="utf-8" ?&gt;
       &lt;configuration&gt;
          &lt;configSections&gt;
              &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /&gt;
          &lt;/configSections &gt;
          &lt;log4net debug="true"&gt;
    &lt;appender name="LogFileAppender" type="log4net.Appender.FileAppender"&gt;
          &lt;layout type="log4net.Layout.XMLLayout" /&gt; --&gt;
          &lt;param name="File" value="TestLog.log" /&gt;
          &lt;param name="AppendToFile" value="false" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
              &lt;header type="log4net.Util.PatternString" value="[START LOG] %newline" /&gt;
              &lt;footer type="log4net.Util.PatternString" value="[END LOG] %newline" /&gt;
              &lt;conversionPattern value="%d [%t] %-5p - %m%n" /&gt;
          &lt;/layout&gt;
          &lt;filter type="log4net.Filter.LevelRangeFilter"&gt;
              &lt;param name="LevelMin" value="DEBUG"/&gt;
              &lt;param name="LevelMax" value="ERROR"/&gt;
          &lt;/filter&gt;
      &lt;/appender&gt;
  &lt;root&gt;
          &lt;level value="ALL" /&gt;
          &lt;appender-ref ref="LogFileAppender" /&gt;
      &lt;/root&gt;
      &lt;logger name="log4NetExample"&gt;
          &lt;!-- &lt;appender-ref ref="B" /&gt; --&gt;
          &lt;level value="ALL" /&gt;
          &lt;appender-ref ref="LogFileAppender" /&gt;
      &lt;/logger&gt;
  &lt;/log4net&gt;
  </code></pre>
  
  <p></p>