title: .Net Core Console Logging not appearing
body: <p>Found this <a href="https://blog.gerardbeckerleg.com/posts/how-to-add-microsofts-console-log-provider-to-dot-net-core-2-console-application-using-the-built-in-service-provider/" rel="nofollow noreferrer">article</a> on .Net logging in a console app but it's not working for me. The sample log doesn't appear in the console.</p>
  <p>I am using the latest logging packages</p>
  <p><strong>The References</strong></p>
  <pre><code>  &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;Microsoft.Extensions.DependencyInjection&quot; Version=&quot;3.1.7&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.Extensions.Logging&quot; Version=&quot;3.1.7&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.Extensions.Logging.Console&quot; Version=&quot;3.1.7&quot; /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>
  <p><strong>The Code</strong></p>
  <pre><code>using System;
  using Microsoft.Extensions.DependencyInjection;
  using Microsoft.Extensions.Logging;
  
  class Program
  {
      static void Main(string[] args)
      {
          // instantiate DI and configure logger
          var serviceProvider = new ServiceCollection()
              .AddLogging(cfg =&gt; cfg.AddConsole())
              .AddTransient&lt;Program&gt;()
              .Configure&lt;LoggerFilterOptions&gt;(cfg =&gt; cfg.MinLevel = LogLevel.Information)
              .BuildServiceProvider();
          // get instance of logger
          var logger = serviceProvider.GetService&lt;ILogger&lt;Program&gt;&gt;();
          // use the logger
          logger.LogInformation(&quot;Woo Hooo&quot;);
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/L3hWA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L3hWA.png" alt="enter image description here" /></a></p>