title: Add Multiple log file .netcore project by using serilog
body: <p>I added log file in my .netcore MVC project by using serilog and I read all parameter appsettings.json file. Serilog configuration is (in appsettings) like this.</p>
  
  <p>In This solution, all logs are written in the one file. But I want to write different error message different files. Such as my X method errors are written xMethodLogs.txt and Y method errors are written yMethodLogs.txt</p>
  
  <p>MyStartup.cs file is</p>
  
  <pre><code> public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
      {
          loggerFactory.AddConsole(Configuration.GetSection("Logging"));
          loggerFactory.AddDebug();
          loggerFactory.AddSerilog();
  
          app.UseMvc();
          app.UseMvc(routes =&gt;
          {
              routes.MapRoute("default", "api/{controller=Home}/{action=Index}/{id?}/{sad?}");
          });
      }
  
  
  public Startup(IHostingEnvironment env)
      {
          var builder = new ConfigurationBuilder()
              .SetBasePath(env.ContentRootPath)
              .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
              .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
              .AddEnvironmentVariables();
          Configuration = builder.Build();
      }
  </code></pre>
  
  <p>My appsettings file is </p>
  
  <pre><code>"Serilog": { 
      "Using": [ "Serilog.Sinks.RollingFile" ], 
      "MinimumLevel": "Error", 
      "WriteTo": [ { 
          "Name": "RollingFile", 
          "Args": { "pathFormat": "C:\\MyPro\\ServiceLog.txt" } 
      } ], 
      "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ], 
      "Properties": { "Application": "Sample" } 
  }
  </code></pre>