title: Configure Log4Net in web application
body: <p>I have this code and the config file below:</p>
  
  <pre><code>ILog log = LogManager.GetLogger(typeof(MyClass));
  log.Debug("Testing");
  </code></pre>
  
  <p><code>TestProj</code> directory is not created and if I create it, no <code>TestLog.txt</code> file, no log ... nothing.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks,</p>
  
  <p><strong>The config file</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;
  
  &lt;log4net debug="true"&gt;
  &lt;appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"&gt;
    &lt;file value="C:\\TestProj\\TestLog.txt" /&gt;
    &lt;appendToFile value="true" /&gt;
    &lt;rollingStyle value="Size" /&gt;
    &lt;maxSizeRollBackups value="10" /&gt;
    &lt;maximumFileSize value="10MB" /&gt;
    &lt;staticLogFileName value="true" /&gt;
    &lt;layout type="log4net.Layout.PatternLayout"&gt;
      &lt;conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;root&gt;
    &lt;level value="DEBUG" /&gt;
    &lt;appender-ref ref="RollingLogFileAppender" /&gt;
  &lt;/root&gt;
  &lt;/log4net&gt;
  </code></pre>