From ee35aca18dae07a9f25cac114f78c18d249218ec Mon Sep 17 00:00:00 2001 From: Christian Kadluba <10721825+ckadluba@users.noreply.github.com> Date: Sun, 23 Mar 2025 20:48:03 +0100 Subject: [PATCH 1/7] Bumped patch version after release --- src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj b/src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj index d4a75b91..d0a22573 100644 --- a/src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj +++ b/src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj @@ -2,7 +2,7 @@ A Serilog sink that writes events to Microsoft SQL Server and Azure SQL - 8.2.0 + 8.2.1 true 8.0.0 Michiel van Oudheusden;Christian Kadluba;Serilog Contributors From b511511dc3b755209b42864a9222a9caf1a6fc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Can=20=C3=87akar?= <54742785+cancakar35@users.noreply.github.com> Date: Sun, 27 Apr 2025 17:16:28 +0300 Subject: [PATCH 2/7] Update .editorconfig --- .editorconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 39e87f8d..aa0ea6b3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -76,5 +76,4 @@ dotnet_naming_symbols.public_constant_static_fields.required_modifiers = const, dotnet_naming_style.pascal_case.capitalization = pascal_case dotnet_sort_system_directives_first = true -dotnet_style_require_accessibility_modifiers = always:error - +dotnet_style_require_accessibility_modifiers = for_non_interface_members:error From 7014da25ad97230e866fcfd7824ed95b28c18a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Can=20=C3=87akar?= <54742785+cancakar35@users.noreply.github.com> Date: Sun, 27 Apr 2025 17:17:33 +0300 Subject: [PATCH 3/7] Convert AppConfigDemo to SDK style --- sample/AppConfigDemo/App.config | 3 - sample/AppConfigDemo/AppConfigDemo.csproj | 68 +---------------------- 2 files changed, 3 insertions(+), 68 deletions(-) diff --git a/sample/AppConfigDemo/App.config b/sample/AppConfigDemo/App.config index 39b41390..5832773a 100644 --- a/sample/AppConfigDemo/App.config +++ b/sample/AppConfigDemo/App.config @@ -3,9 +3,6 @@
- - - diff --git a/sample/AppConfigDemo/AppConfigDemo.csproj b/sample/AppConfigDemo/AppConfigDemo.csproj index 5d6579f1..9dd1304e 100644 --- a/sample/AppConfigDemo/AppConfigDemo.csproj +++ b/sample/AppConfigDemo/AppConfigDemo.csproj @@ -1,71 +1,9 @@ - - - + - Debug - AnyCPU - {6BFE1D21-1442-4375-AB69-14160B906A64} + net462 Exe - AppConfigDemo - AppConfigDemo - v4.6.2 - 512 - true - true - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {803cd13a-d54b-4cec-a55f-e22ae3d93b3c} - Serilog.Sinks.MSSqlServer - - - + - From 64d93033376e809803a85884a616cf2f265092a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Can=20=C3=87akar?= <54742785+cancakar35@users.noreply.github.com> Date: Sat, 3 May 2025 14:37:07 +0300 Subject: [PATCH 4/7] Update Microsoft.Data.SqlClient to 5.2.3 --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1b575644..d24d377b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,7 +6,7 @@ - + @@ -22,4 +22,4 @@ - \ No newline at end of file + From 027a6b8d90a3f5e2268ba6485a3795a8105db9b6 Mon Sep 17 00:00:00 2001 From: Christian Kadluba <10721825+ckadluba@users.noreply.github.com> Date: Fri, 4 Jul 2025 23:25:09 +0200 Subject: [PATCH 5/7] Removed obsolete SourceLink package Do not need to reference the SourceLink packages anymore since the sink was updated to .NET 8 SDK which includes SourceLink https://github.com/dotnet/sourcelink/releases/tag/8.0.0. --- Directory.Packages.props | 1 - README.md | 2 +- src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index d24d377b..ea880d78 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,7 +11,6 @@ - diff --git a/README.md b/README.md index 686abcc4..e9a7091a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A Serilog sink that writes events to Microsoft SQL Server. This sink will write the log event data to a table and can optionally also store the properties inside an XML or JSON column so they can be queried. Important properties can also be written to their own separate columns. **Package** - [Serilog.Sinks.MSSqlServer](http://nuget.org/packages/serilog.sinks.mssqlserver) -| **Minimum Platforms** - .NET Framework 4.6.2, .NET 6.0, .NET Standard 2.0 +| **Minimum Platforms** - .NET Framework 4.6.2, .NET 8.0, .NET Standard 2.0 #### Topics diff --git a/src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj b/src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj index d0a22573..8cccba2a 100644 --- a/src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj +++ b/src/Serilog.Sinks.MSSqlServer/Serilog.Sinks.MSSqlServer.csproj @@ -33,7 +33,6 @@ - From 8edf030e2dc0ebe7826e62f1d8d8b7295004c93f Mon Sep 17 00:00:00 2001 From: Christian Kadluba <10721825+ckadluba@users.noreply.github.com> Date: Fri, 4 Jul 2025 23:28:12 +0200 Subject: [PATCH 6/7] Fixed minor style issues --- .../Sinks/MSSqlServer/Output/XmlPropertyFormatter.cs | 4 ++-- .../Sinks/MSSqlServer/Platform/SqlCreateTableWriter.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/Output/XmlPropertyFormatter.cs b/src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/Output/XmlPropertyFormatter.cs index 98551e09..7adc2003 100644 --- a/src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/Output/XmlPropertyFormatter.cs +++ b/src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/Output/XmlPropertyFormatter.cs @@ -9,7 +9,7 @@ namespace Serilog.Sinks.MSSqlServer.Output { internal class XmlPropertyFormatter : IXmlPropertyFormatter { - private static readonly Regex _invalidXMLChars = new Regex( + private static readonly Regex _invalidXmlChars = new Regex( @"(? "\\u" + ((ushort)m.Value[0]).ToString("x4", CultureInfo.InvariantCulture))).ToString(); + return new XText(_invalidXmlChars.Replace(value.ToString(), m => "\\u" + ((ushort)m.Value[0]).ToString("x4", CultureInfo.InvariantCulture))).ToString(); } private string SimplifyDictionary(ColumnOptions.PropertiesColumnOptions options, DictionaryValue dict) diff --git a/src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/Platform/SqlCreateTableWriter.cs b/src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/Platform/SqlCreateTableWriter.cs index 12fe0581..e1ce1026 100644 --- a/src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/Platform/SqlCreateTableWriter.cs +++ b/src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/Platform/SqlCreateTableWriter.cs @@ -48,7 +48,7 @@ public string GetSql() { var common = (SqlColumn)column.ExtendedProperties["SqlColumn"]; - sql.Append(GetColumnDDL(common)); + sql.Append(GetColumnDdl(common)); if (dataTable.Columns.Count > i++) sql.Append(','); sql.AppendLine(); @@ -84,7 +84,7 @@ public string GetSql() // Examples of possible output: // [Id] BIGINT IDENTITY(1,1) NOT NULL // [Message] VARCHAR(1024) NULL - private static string GetColumnDDL(SqlColumn column) + private static string GetColumnDdl(SqlColumn column) { var sb = new StringBuilder(); From 63752111f7cbbabc38b0917f436d42c3d7566daf Mon Sep 17 00:00:00 2001 From: Christian Kadluba <10721825+ckadluba@users.noreply.github.com> Date: Fri, 4 Jul 2025 23:37:25 +0200 Subject: [PATCH 7/7] Updated CHANGES.md --- CHANGES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 3c68729d..828a0cce 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +# 8.2.1 +* Updated SqlClient to 5.2.3 (thanks to @cancakar35) +* Fixes in .editorconfig (thanks to @cancakar35) +* Convert AppConfigDemo to SDK style (thanks to @cancakar35) +* Removed obsolete SourceLink package references +* Small code style fixes + # 8.2.0 * Added `ConnectionConfiguration` sink option to customize SqlConnection before use (thanks to @nhart12)