title: Log4Net and Application Insights-no data is coming through
body: <p>I'm using Log4Net in my my C# console application and want the logged events to appear in Application Insights as well.</p>
  
  <p>I've added Application Insights as well as the Application Insights Log4Net Appender.</p>
  
  <p>I've followed the instructions here: <a href="https://jan-v.nl/post/using-application-insights-in-your-log4net-application" rel="nofollow noreferrer">https://jan-v.nl/post/using-application-insights-in-your-log4net-application</a> with no luck.</p>
  
  <p>Log4Net is logging fine. However, when I go to the Application Insights dashboard, I see this: "THE APPLICATION HAS NO DATA IN APPLICATION INSIGHTS."</p>
  
  <p>At the beginning of my main cs file, I've got this:</p>
  
  <pre><code>var telemetryClient = new TelemetryClient { InstrumentationKey = ConfigurationManager.AppSettings["applicationInsights"] };
  </code></pre>
  
  <p>at the end, there is this: </p>
  
  <pre><code>telemetryClient.Flush();
  </code></pre>
  
  <p>In my app.config file, I have this:</p>
  
  <pre><code> &lt;log4net&gt;
      &lt;root&gt;
        &lt;level value="INFO" /&gt;
        &lt;appender-ref ref="FileAppender" /&gt;
        &lt;appender-ref ref="aiAppender" /&gt;
      &lt;/root&gt;
      &lt;appender name="FileAppender" type="log4net.Appender.FileAppender"&gt;
        &lt;file value="C:\logs\logfile.txt" /&gt;
        &lt;appendToFile value="true" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] – %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="%message%newline" /&gt;
        &lt;/layout&gt;
      &lt;/appender&gt;
    &lt;/log4net&gt;
  </code></pre>
  
  <p>When I run the application, I see this sort of thing in the output window:</p>
  
  <pre><code>Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Message","time":"2017-07-04T10:26:15.7741453Z","tags":{"ai.internal.sdkVersion":"log4net:2.2.0-220","ai.cloud.roleInstance":"xxx","ai.user.id":"AzureAD\\xxx"},"data":{"baseType":"MessageData","baseData":{"ver":2,"message":"xxx","severityLevel":"Information","properties":{xxx"}}}}
  </code></pre>
  
  <p>What am I missing?</p>