title: .NET Core DI Logger on Console app not logging to Console
body: <p>I've got a .NET Core console app. Pretty simple. At this point the goal was just to get DI and Configuration integrated. However, the <code>LogDebug</code> isn't logging to the console.</p>
  
  <p>What could I have possibly done wrong here?</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          var topic = Environment.GetEnvironmentVariable("RECEIVER_TOPIC");
          var entity = Environment.GetEnvironmentVariable("RECEIVER_ENTITY");
  
          //setup our DI
          var serviceProvider = new ServiceCollection()
              .AddLogging()
              .BuildServiceProvider();
  
          //configure console logging
          serviceProvider
              .GetService&lt;ILoggerFactory&gt;()
              .AddConsole(LogLevel.Debug);
  
          var logger = serviceProvider
              .GetService&lt;ILoggerFactory&gt;()
              .CreateLogger&lt;Program&gt;();
          logger.LogDebug($"Starting application. Topic: {topic}. Entity: {entity}.");
  
          if (Debugger.IsAttached)
          {
              Console.ReadLine();
          }
      }
  
      static IConfigurationRoot GetConfiguration()
      {
          var builder = new ConfigurationBuilder()
              .SetBasePath(Directory.GetCurrentDirectory())
              .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
  
          return builder.Build();
      }
  }
  </code></pre>
  
  <h1>Update 1</h1>
  
  <p>I added the <code>Microsoft.Extensions.Logging.Debug</code> NuGet package, and modified the <code>serviceProvider</code> initialization to append the <code>AddDebug</code> like so:</p>
  
  <pre><code>serviceProvider
      .GetService&lt;ILoggerFactory&gt;()
      .AddConsole(LogLevel.Debug)
      .AddDebug();
  </code></pre>
  
  <p>But it's not even logging to the <code>Debug</code> window.</p>