title: Not sure how to get Glimpse.Log4Net working
body: <p>I'm trying to get Glimpse.Log4Net working in an existing ASP.Net MVC v4 project (in VS2010), following the docs <a href="https://github.com/jchadwick/Glimpse.Log4Net" rel="nofollow">here</a> and <a href="http://gouigoux.com/blog-fr/?p=750" rel="nofollow">here</a>, but although the solution compiles and runs Glimpse and log4net seem to be working correctly, I can't see the log4net stuff in the Glimpse window that I'm expecting and as shown near the end of the page in the 2nd link. </p>
  
  <p>I've got dependancy injection going with Autofac using <a href="http://code.google.com/p/autofac/wiki/Log4NetIntegration" rel="nofollow">this method</a>, and I don't think it is interfering because I get entries as expected in the log file.</p>
  
  <p>Can anyone point me in the right direction?</p>
  
  <p>In my controller:</p>
  
  <pre><code>public class QuoteController : Controller
  {
    private readonly PrintCostEntities db;
  
    private readonly ILog logger;
  
    public QuoteController(PrintCostEntities db, ILog logger)
    {
      if (db == null)
      {
        throw new ArgumentNullException("db");
      }
  
      if (logger == null)
      {
        throw new ArgumentNullException("logger");
      }
  
      this.db = db;
      this.logger = logger;
    }
  
    public ActionResult Index()
    {
      this.logger.DebugFormat("Index");
  
      return this.View(this.db.Quotes);
    }
  }
  </code></pre>
  
  <p>In global.asax:</p>
  
  <pre><code>public class MvcApplication : System.Web.HttpApplication
  {
    private readonly ILog logger;
  
    protected MvcApplication()
    {
      XmlConfigurator.Configure();
      this.logger = LogManager.GetLogger(typeof(MvcApplication));
    }
  
    protected void Application_Start()
    {
      this.logger.Debug("Application_Start");
    }
  }
  </code></pre>
  
  <p>In web.config:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;configuration&gt;
    &lt;configSections&gt;            
      &lt;section name="glimpse" type="Glimpse.Core.Configuration.Section, Glimpse.Core" /&gt;
      &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;
    &lt;/configSections&gt;
    &lt;system.web&gt;
      &lt;httpModules&gt;
        &lt;add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" /&gt;
      &lt;/httpModules&gt;
      &lt;httpHandlers&gt;
        &lt;add path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" /&gt;
      &lt;/httpHandlers&gt;
    &lt;/system.web&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
        &lt;add name="Glimpse" type="Glimpse.AspNet.HttpModule, Glimpse.AspNet" preCondition="integratedMode" /&gt;
      &lt;/modules&gt;
      &lt;handlers&gt;
        &lt;add name="Glimpse" path="glimpse.axd" verb="GET" type="Glimpse.AspNet.HttpHandler, Glimpse.AspNet" preCondition="integratedMode" /&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
    &lt;glimpse defaultRuntimePolicy="On" endpointBaseUri="~/Glimpse.axd" /&gt; 
    &lt;log4net&gt;  
      &lt;appender name="GlimpseAppender" type="Glimpse.Log4Net.Appender.GlimpseAppender"&gt;
        &lt;threshold value="ALL" /&gt;
      &lt;/appender&gt;
      &lt;appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"&gt;
        &lt;threshold value="ALL" /&gt;
        &lt;file value="log4net.log" /&gt;
        &lt;appendToFile value="true" /&gt;
        &lt;rollingStyle value="Date" /&gt;
        &lt;datePattern value="yyyyMMdd" /&gt;
        &lt;maxSizeRollBackups value="5" /&gt;
        &lt;param name="StaticLogFileName" value="true" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" /&gt;
        &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;root&gt;
        &lt;appender-ref ref="GlimpseAppender" /&gt;
        &lt;appender-ref ref="RollingLogFileAppender" /&gt;
      &lt;/root&gt;
    &lt;/log4net&gt;
  &lt;/configuration&gt;
  </code></pre>