title: log4net with ASP.NET MVC: nothing happens
body: <p>I am trying to use log4net with ASP.NET MVC and I cannot get anything to happen with it.
  I've created a config that is in my web project root:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;log4net&gt;
      &lt;root&gt;
          &lt;level value=&quot;INFO&quot; /&gt;
          &lt;appender-ref ref=&quot;RollingLogFileAppender&quot;/&gt;
      &lt;/root&gt;
      
      &lt;appender name=&quot;RollingFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;
          &lt;file value=&quot;C:\DWSApplicationFiles\AppLogs\app.log&quot; /&gt;
          &lt;appendToFile value=&quot;true&quot; /&gt;
          &lt;rollingStyle value=&quot;Size&quot; /&gt;
          &lt;maxSizeRollBackups value=&quot;10&quot; /&gt;
          &lt;maximumFileSize value=&quot;100KB&quot; /&gt;
          &lt;staticLogFileName value=&quot;true&quot; /&gt;
          &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
              &lt;conversionPattern value=&quot;%d [%t]%-5p %c [%x] - %m%n&quot; /&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
      
      &lt;appender name=&quot;RollingLogFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;
          &lt;file value=&quot;C:\DWSApplicationFiles\AppLogs\app.log&quot; /&gt;
          &lt;appendToFile value=&quot;false&quot; /&gt;
          &lt;datePattern value=&quot;-dddd&quot; /&gt;
          &lt;rollingStyle value=&quot;Date&quot; /&gt;
          &lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
              &lt;conversionPattern value=&quot;%d [%t]%-5p %c [%x] - %m%n&quot; /&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  &lt;/log4net&gt;
  </code></pre>
  <p>Before I am asked: yes, the application has permission to write to the directory. I have tested this and the application has permission to this directory.</p>
  <p>Here is where I am trying to use log4net:</p>
  <pre><code>public class HomeController : Controller
  {
      readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
      public ActionResult Index()
      {
          log.Error(&quot;In Index  &quot;);
           return View();
      }
  }
  </code></pre>
  <p>When I run the application and go to this controller log4net does nothing; it doesn't create the files in that directory or anything.</p>
  <p>I have enabled internal debugging for log4net and I get no output errors in the console.
  The following is all I see from log4net:</p>
  <blockquote>
  <p>log4net: log4net assembly [log4net, Version=1.2.10.0, Culture=neutral,   PublicKeyToken=1b44e1d426115821]. Loaded from [C:\Users\twaldron.BULLFROGSPAS\AppData\Local\Temp\Temporary ASP.NET Files\root\7642c99a\60feb7f2\assembly\dl3\17247033\008dfd6d_e2d0ca01\log4net.DLL]. (.NET Runtime [2.0.50727.4952] on Microsoft Windows NT 6.1.7600.0)</p>
  <p>log4net: DefaultRepositorySelector: defaultRepositoryType [log4net.Repository.Hierarchy.Hierarchy]</p>
  <p>log4net: DefaultRepositorySelector: Creating repository for assembly [Bullfrog.DWS.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]</p>
  <p>log4net: DefaultRepositorySelector: Assembly [Bullfrog.DWS.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] Loaded From [C:\Users\twaldron.BULLFROGSPAS\AppData\Local\Temp\Temporary ASP.NET Files\root\7642c99a\60feb7f2\assembly\dl3\2960c79f\b876bb2d_aca7cb01\Bullfrog.DWS.Web.DLL]</p>
  <p>log4net: DefaultRepositorySelector: Assembly [Bullfrog.DWS.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] does not have a RepositoryAttribute specified.</p>
  <p>log4net: DefaultRepositorySelector: Assembly [Bullfrog.DWS.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null] using repository [log4net-default-repository] and repository type [log4net.Repository.Hierarchy.Hierarchy]</p>
  <p>log4net: DefaultRepositorySelector: Creating repository [log4net-default-repository] using type [log4net.Repository.Hierarchy.Hierarchy]
  'WebDev.WebServer20.EXE' (Managed (v2.0.50727)): Loaded 'Anonymously Hosted DynamicMethods Assembly'</p>
  </blockquote>