title: Logging in console application (.NET Core with DI)
body: <p>guys. I try to add logging to my console app with DI (.NET Core 3.1) and seems that IoC container works fine for that, injects logger dependency to my classes, but LogXXX method doesn't log to output. What can be the reason? Maybe there are some additional configurations?</p>
  
  <pre class="lang-cs prettyprint-override"><code>using Microsoft.Extensions.DependencyInjection;
  using Microsoft.Extensions.Logging;
  
  namespace DependencyInjection
  {
      class Program
      {
          static void Main(string[] args)
          {
              var services = new ServiceCollection();
              ConfigureServices(services);
  
              var serviceProvider = services.BuildServiceProvider();
  
              var logger = serviceProvider.GetService&lt;ILogger&lt;Program&gt;&gt;();
              logger.LogInformation("Hello world!");
          }
  
          static void ConfigureServices(ServiceCollection services)
          {
              services.AddLogging(loggerBuilder =&gt;
              {
                  loggerBuilder.ClearProviders();
                  loggerBuilder.AddConsole();
              });
          }
      }
  }
  </code></pre>