title: Serilog - multiple log files
body: <p>I am using Serilog for logging and cant' figure out how to separate log events to different files. For example, I want to log errors to error_log-ddmmyyyy.txt and warnings to warn_log-ddmmyyyy.txt.</p>
  
  <p>Here goes my logger configuration:</p>
  
  <pre><code>Log.Logger = new LoggerConfiguration()
              .WriteTo.Logger(lc =&gt;
                  lc.Filter.ByIncludingOnly(Matching.WithProperty("Level", "Warning"))
                      .WriteTo.RollingFile(
                          Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Logs\warn_log-{Date}.txt"),
                          outputTemplate: OutputTemplate))
              .WriteTo.Logger(lc =&gt;
                  lc.Filter.ByIncludingOnly(Matching.WithProperty("Level", "Error"))
                      .WriteTo.RollingFile(
                          Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Logs\error_log-{Date}.txt"),
                          outputTemplate: OutputTemplate))
              .CreateLogger();
  </code></pre>
  
  <p>It only works when I specify {Level} property exatcly in log message.</p>
  
  <p>I was trying to use:</p>
  
  <pre><code>Matching.WithProperty&lt;LogEventLevel&gt;("Level", l =&gt; l == LogEventLevel.Warning)
  </code></pre>
  
  <p>but it didn't work too.</p>