title: Serilog does not write log to file while using InProcess hosting model in ASP.NET Core 2.2
body: <p>If I use newly introduced <code>InProcess</code> hosting model in <code>ASP.NET Core 2.2</code> as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;PropertyGroup&gt;
    &lt;TargetFramework&gt;netcoreapp2.2&lt;/TargetFramework&gt;
    &lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;
  &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p><code>Serilog</code> does not write log to file. but if I remove <code>&lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;</code> from <code>.csproj</code> everything works as expected.</p>
  
  <p>My <code>Serilog</code> configuration in the <code>Program</code> class as follows:</p>
  
  <pre><code>public class Program
  {
      public static void Main(string[] args)
      {
          Log.Logger = new LoggerConfiguration()
              .MinimumLevel.Information() // Set the minimun log level
              .WriteTo.File("Logs\\log-.txt", rollingInterval: RollingInterval.Day, retainedFileCountLimit: 7) // this is for logging into file system
              .CreateLogger();
  
          try
          {
              Log.Information("Starting web host");
              CreateWebHostBuilder(args).Build().Run();
          }
          catch (Exception ex)
          {
              Log.Fatal(ex, "Host terminated unexpectedly");
          }
          finally
          {
              Log.CloseAndFlush();
          }
  
      }
  
      public static IWebHostBuilder CreateWebHostBuilder(string[] args) =&gt;
          WebHost.CreateDefaultBuilder(args)
              .UseStartup&lt;Startup&gt;()
              .ConfigureLogging(logging =&gt; { logging.ClearProviders(); }) // clearing all other logging providers
              .UseSerilog(); // Using serilog 
  }
  </code></pre>
  
  <p>Any thought from the expert please!</p>