From 7bd6fa31ea3eeabab62c76180d4c059ca17dab9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B6derstrand?= Date: Fri, 14 Sep 2018 22:46:17 +0200 Subject: [PATCH] Changed FailureSink from FileSink(deprecated) to RollingFileSink (#190) --- 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();