title: Serilog: rolling log file per day, but also per application run?
body: <p>How can you configure Serilog to roll log files <strong>per day</strong>, but <strong><em>also</em></strong> have <strong>a new log file on every</strong> new application <strong>run</strong>? I didn't find a way for that, where my old log files would still be deleted.</p>
  
  <p>If I would name my log file like:</p>
  
  <pre><code>string timestamp = DateTime.Now.ToString( "yyyy-MM-dd_HH-mm-ss", DateTimeFormatInfo.InvariantInfo );
  ....
  .WriteTo.File( $@"logs\Info_{timestamp}.txt", retainedFileCountLimit: 90, rollingInterval: RollingInterval.Day, restrictedToMinimumLevel: LogEventLevel.Information, outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}]&lt;{ThreadName}({ThreadId})&gt; {Message:lj}{NewLine}{Exception}" )
  </code></pre>
  
  <p>I will get a new log file per application run like:</p>
  
  <p>Info_2018-05-15_07-42-09<strong>20180515</strong>.txt</p>
  
  <p>Info_2018-05-15_07-42-39<strong>20180515</strong>.txt</p>
  
  <p>But then <strong>20180515</strong> is added automatically <em>(I don't want)</em>,
  because of rollingInterval: RollingInterval.<strong>Day</strong> <em>(I want)</em> and
  later my log files will fall through the<br>
  automatic deletion process <em>(I would need)</em>, because of the:</p>
  
  <pre><code>DirectorySearchPattern = $"{_filenamePrefix}*{_filenameSuffix}";
  </code></pre>
  
  <p>in the <strong><em>PathRoller.cs</em></strong> of Serilog.Sinks.File</p>