title: How to configure NLog to only log from a certain level for a logger namespace for *all* targets
body: <p>I have the following loggers configured.</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;nlog xmlns=&quot;http://www.nlog-project.org/schemas/NLog.xsd&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
    &lt;targets&gt;
      &lt;target name=&quot;file&quot; xsi:type=&quot;File&quot; fileName=&quot;trace.log&quot;/&gt;
      &lt;target name=&quot;trace&quot; xsi:type=&quot;OutputDebugString&quot;/&gt;
      &lt;target name=&quot;console&quot; xsi:type=&quot;ColoredConsole&quot; /&gt;
    &lt;/targets&gt;
    &lt;rules&gt;
        &lt;logger name=&quot;*&quot; minlevel=&quot;Info&quot; writeTo=&quot;file&quot; /&gt;
        &lt;logger name=&quot;*&quot; minlevel=&quot;Info&quot; writeTo=&quot;trace&quot; /&gt;
        &lt;logger name=&quot;*&quot; minlevel=&quot;Info&quot; writeTo=&quot;console&quot; /&gt;
    &lt;/rules&gt;
  &lt;/nlog&gt;
  </code></pre>
  <p>I want everything for <strong>Component.</strong>* to only be logged from WARN and higher for all loggers. With NHibernate, this is easy:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;logger name=&quot;NHibernate.SQL&quot;&gt;
    &lt;level value=&quot;OFF&quot;/&gt;
  &lt;/logger&gt;
  </code></pre>
  <p>I tried to add the following:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;logger name=&quot;Component.*&quot; minlevel=&quot;Warn&quot; final=&quot;true&quot; /&gt;
  </code></pre>
  <p>This doesn't work.</p>
  <p>How do I only log from a certain level for a logger namespace for <em>all</em> targets?</p>