Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Changed FailureSink from FileSink(deprecated) to RollingFileSink (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
josoder authored and mivano committed Sep 14, 2018
1 parent 179dd3a commit 7bd6fa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sample/Serilog.Sinks.Elasticsearch.Sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Serilog;
using Serilog.Debugging;
using Serilog.Formatting.Json;
using Serilog.Sinks.File;
using Serilog.Sinks.RollingFile;
using Serilog.Sinks.SystemConsole.Themes;

namespace Serilog.Sinks.Elasticsearch.Sample
Expand All @@ -23,7 +23,7 @@ static void Main(string[] args)
EmitEventFailure = EmitEventFailureHandling.WriteToSelfLog |
EmitEventFailureHandling.WriteToFailureSink |
EmitEventFailureHandling.RaiseCallback,
FailureSink = new FileSink("./failures.txt", new JsonFormatter(), null)
FailureSink = new RollingFileSink("./fail-{Date}.txt", new JsonFormatter(), null, null)
})
.CreateLogger();

Expand Down

2 comments on commit 7bd6fa3

@stephenpatten
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question:

Why use the RollingFileSync? I thought that the Serilog File was the app to use going forward, and now contained all of the functionality of the Rolling sink.

Thank you,
Stephen

@pierresetteskog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question!!

Please sign in to comment.