title: Serilog SelfLog to File Error
body: <p>I need to enable self log of seri logger to text file. My configuration are follows;</p>
  
  <pre><code>__serilogLogger = new LoggerConfiguration()
        .Enrich.WithProperty("ApplicationIPv4", _ipv4)
        .Enrich.WithProperty("ApplicationIPv6", _ipv6)
        .WriteTo.MSSqlServer(connectionString, tableName /*, columnOptions: columnOptions*/)
        .WriteTo
        .Seq(ConfigurationManager.AppSettings["SerilogServer"])
        .CreateLogger();
  
        var file = File.CreateText("Self.log");
        Serilog.Debugging.SelfLog.Enable(TextWriter.Synchronized(file));
  </code></pre>
  
  <p>But is hows File access error when run the application. Please find the error details below;</p>
  
  <blockquote>
    <p>Additional information: The process cannot access the file 'C:\Program
    Files (x86)\IIS Express\Self.log' because it is being used by another
    process.</p>
  </blockquote>
  
  <p>Can anyone help me on this</p>