title: How to get ILoggerFactory in .net 6
body: <p>In .Net5 ILoggerFactory is used as Configure function in Startup.cs as follows :</p>
  <pre><code>public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
  {
      //here we used loggerFactory
      loggerFactory.AddProvider(loggerprovider);
  }
  </code></pre>
  <p>In .Net6 how to get it with aap or builder</p>
  <pre><code>var app = builder.Build();
  </code></pre>
  <p>OR</p>
  <pre><code>var builder = WebApplication.CreateBuilder(args);
  </code></pre>