title: Serilog - how to customize date in rolling file name?
body: <p>In Serilog, you can easily enable rolling log files:</p>
  
  <pre class="lang-cs prettyprint-override"><code>Log.Logger = new LoggerConfiguration()
      .WriteTo.File("log-.txt", rollingInterval: RollingInterval.Day)
      .CreateLogger();
  </code></pre>
  
  <p>This will create a new log file every day in the following format:</p>
  
  <ul>
  <li><code>log-20200214.txt</code></li>
  <li><code>log-20200215.txt</code></li>
  <li><code>log-20200216.txt</code></li>
  </ul>
  
  <p><strong>My question:</strong> is it possible to customize where the date is placed in the file name, and to customize how the date is formatted?</p>
  
  <p>e.g. I want the file names to look like this:</p>
  
  <ul>
  <li><code>2020-02-14-log.txt</code></li>
  <li><code>2020-02-15-log.txt</code></li>
  <li><code>2020-02-16-log.txt</code></li>
  </ul>
  
  <p>I was hoping replacing <code>"log-.txt"</code> with <code>"{Date:yyyy-MM-dd}-log.txt"</code> would work, but it doesn't.</p>