title: Log4net doesn't log to Application Insights
body: <p>I'm using log4net for my MVC application. The log4net.config file is independent from web.config. I added ApplicationInsights.Log4NetAppender to my UI project and moved the aiAppender from web.config to log4net.config. Somehow the application is able to log data into the Logs.txt, but it doesn't log to ApplicationInsights. </p>
  
  <p>Please help me to figure out this issue.
  Here is my log4net.config:</p>
  
  <pre><code>&lt;log4net&gt;
    &lt;appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" &gt;
      &lt;file value="App_Data/Logs/Logs.txt" /&gt;
      &lt;encoding value="utf-8" /&gt;
      &lt;appendToFile value="true" /&gt;
      &lt;rollingStyle value="Size" /&gt;
      &lt;maxSizeRollBackups value="10" /&gt;
      &lt;maximumFileSize value="10000KB" /&gt;
      &lt;staticLogFileName value="true" /&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%-5level %date [%-5.5thread] %-40.40logger - %message%newline" /&gt;
      &lt;/layout&gt;
    &lt;/appender&gt;
    &lt;appender name="aiAppender" type="Microsoft.ApplicationInsights.Log4NetAppender.ApplicationInsightsAppender, Microsoft.ApplicationInsights.Log4NetAppender"&gt;
      &lt;layout type="log4net.Layout.PatternLayout"&gt;
        &lt;conversionPattern value="%-5level %date [%-5.5thread] %-40.40logger - %message%newline" /&gt;
      &lt;/layout&gt;
    &lt;/appender&gt;
    &lt;root&gt;
      &lt;level value="DEBUG" /&gt;
      &lt;appender-ref ref="RollingFileAppender" /&gt;
      &lt;appender-ref ref="aiAppender" /&gt;
    &lt;/root&gt;
  &lt;/log4net&gt;
  </code></pre>
  
  <p>The InstrucmentationKey for applicationinsights is reading from appsettings. </p>
  
  <pre><code>TelemetryConfiguration.Active.InstrumentationKey = WebConfigurationManager.AppSettings["InstrumentationKey"];
  </code></pre>
  
  <p>In AdaptiveSamplingTelemetryProcessor, I'm using adpative sampling.</p>
  
  <pre><code>&lt;Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel"&gt;
    &lt;MaxTelemetryItemsPerSecond&gt;5&lt;/MaxTelemetryItemsPerSecond&gt;
    &lt;ExcludedTypes&gt;Event&lt;/ExcludedTypes&gt;
  &lt;/Add&gt;
  </code></pre>
  
  <p>I could see all dependencies and requests get logged on ApplicationInsights, but couldn't find any data from log4net. </p>