title: .NET Core 6 - How to set ILogger(log4net) for Dependency Injection in Program.cs
body: <p>I've moved my new projects to <strong>.NET Core 6</strong> but apparently there are radical changes in Program and Startup.cs files.</p>
  <p>I would like to use log4net in every Controller with Dependency Injection but I couldn't find any tutorial about Logging in <strong>.NET Core 6.</strong></p>
  <p>What I tried:</p>
  <pre><code>builder.Services.AddLogging();
  builder.Logging.AddProvider(loggerProvider);
  </code></pre>
  <p>What should I write to use ILogger in Controllers?</p>