title: How to turn off Microsoft Logs in AspNetCore 2.2 NLog
body: <p>The following is my Logs </p>
  
  <blockquote>
    <p>[2019-05-07 15:55:38.4270][PC-20170829ROEW][Info] my logs recorded</p>
    
    <p>[2019-05-07 15:55:38.4929][PC-20170829ROEW][Info] Route matched with {action = >"Get", controller = "Values"}. Executing action >QunarFlight.Web.Controllers.ValuesController.Get (QunarFlight.Web)</p>
    
    <p>[2019-05-07 15:55:38.5798][PC-20170829ROEW][Info] Executing action method >QunarFlight.Web.Controllers.ValuesController.Get (QunarFlight.Web) - Validation >state: Valid</p>
    
    <p>[2019-05-07 15:55:38.6066][PC-20170829ROEW][Info] Executed action method >QunarFlight.Web.Controllers.ValuesController.Get (QunarFlight.Web), returned >result Microsoft.AspNetCore.Mvc.ObjectResult in 22.6363ms.</p>
    
    <p>[2019-05-07 15:55:38.6066][PC-20170829ROEW][Info] Executing ObjectResult, >writing value of type 'System.String[]'.</p>
  </blockquote>
  
  <p>I want to close all Microsoft default logs( Last four records ), only keep the logs I have recorded( the first one record).
  i modify appsettings.json on the following</p>
  
  <pre><code>"Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore.Hosting": "Warning",
      "Microsoft.AspNetCore.Routing": "Warning",
      "Microsoft.AspNetCore.Mvc": "Warning"
   }
  </code></pre>
  
  <p>in this case, my recorded logs will not be output. if i remove "Microsoft.AspNetCore.Mvc": "Warning" my recorded logs will be output .How should I modify it?</p>
  
  <p>appsettings.json</p>
  
  <pre><code>"Logging": {
     "LogLevel": {
       "Default": "Information",
       "Microsoft.AspNetCore.Hosting": "Warning",
       "Microsoft.AspNetCore.Routing": "Warning",
       "Microsoft.AspNetCore.Mvc": "Warning"
  }
  </code></pre>
  
  <p>configure in Startup.cs</p>
  
  <pre><code>public void Configure(IApplicationBuilder app, IHostingEnvironment env, 
  ILoggerFactory loggerFactory)
      {
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }
          env.ConfigureNLog("NLog.config");
          loggerFactory.AddNLog();
          app.UseMiddleware&lt;CustomMiddleware&gt;();
          app.UseMvc();
      }
  </code></pre>
  
  <p>Program.cs</p>
  
  <pre><code>    public static IWebHostBuilder CreateWebHostBuilder(string[] args) =&gt;
          WebHost.CreateDefaultBuilder(args).ConfigureAppConfiguration((builderContext, config) =&gt;
          {
              config.AddJsonFile("appsetting.json", optional: true, reloadOnChange: true)
               .AddJsonFile($"appsettings.{builderContext.HostingEnvironment.EnvironmentName}.json", true, true)
               ;
          })
              .UseStartup&lt;Startup&gt;();
  </code></pre>