From 4ba3176fe4bbc0b362b83d862868bd53a2a6c753 Mon Sep 17 00:00:00 2001 From: josoder Date: Thu, 13 Sep 2018 12:27:30 +0200 Subject: [PATCH] Changed FailureSink from FileSink(deprecated) to RollingFileSink --- sample/Serilog.Sinks.Elasticsearch.Sample/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/Serilog.Sinks.Elasticsearch.Sample/Program.cs b/sample/Serilog.Sinks.Elasticsearch.Sample/Program.cs index 72131959..6742883d 100644 --- a/sample/Serilog.Sinks.Elasticsearch.Sample/Program.cs +++ b/sample/Serilog.Sinks.Elasticsearch.Sample/Program.cs @@ -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 @@ -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();