From affe14524e7259108b086a4502d92a9d9f05f4ff Mon Sep 17 00:00:00 2001 From: "Jonas Merkle [JJM]" Date: Tue, 28 Apr 2020 12:29:57 +0200 Subject: [PATCH] added support for netstandard2.0 --- .../Serilog.Sinks.SlackWebHook.csproj | 2 +- .../Serilog.Sinks.SlackWebHook/SlackSinkMessageTools.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook.csproj b/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook.csproj index 1dbb846..0ddbd24 100644 --- a/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook.csproj +++ b/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + netstandard2.1;netstandard2.0; Jonas Merkle [JJM] LICENSE.txt GitHub diff --git a/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook/SlackSinkMessageTools.cs b/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook/SlackSinkMessageTools.cs index 4c76eda..678225f 100644 --- a/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook/SlackSinkMessageTools.cs +++ b/Serilog.Sinks.SlackWebHook/Serilog.Sinks.SlackWebHook/SlackSinkMessageTools.cs @@ -99,13 +99,13 @@ public static List GenerateSlackMessageAttachments(LogEvent log var stringWriter = new StringWriter(); // collect all log event information - foreach (var (key, value) in logEvent.Properties) + foreach (var property in logEvent.Properties) { - value.Render(stringWriter, formatProvider: formatProvider); + property.Value.Render(stringWriter, formatProvider: formatProvider); var field = new SlackField { Short = slackSinkOptions.SlackDisplayExtendedInfoAttachmentShort, - Title = key, + Title = property.Key, Value = stringWriter.ToString() }; infoFields.Add(field);