title: Custom logging to app insights from .net core
body: <p>I'm using App Insights in a .net core web app and I can successfully see the telemetry data in the app insights logs. I would now like to be able to push up my own log events, but cannot seem to get it to work (i.e. my custom log events do not appear in app insights). My code is as follows:</p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
  {
      loggerFactory.AddApplicationInsights(app.ApplicationServices);
      loggerFactory.AddDebug();
  
      var logger = loggerFactory.CreateLogger&lt;Startup&gt;();
  
      logger.LogInformation("I am a log event");
  </code></pre>
  
  <p>I've also tried setting the log level explicitly like:</p>
  
  <pre><code>loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Debug);
  </code></pre>
  
  <p>But I never see the text "I am a log event" in app insights. </p>
  
  <p>Can anyone tell me how I can fix this?</p>