Skip to content

Removed obsolete SourceLink, minor fixes & updated changelog #621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="coverlet.collector" Version="3.2.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
<PackageVersion Include="Dapper.StrongName" Version="2.1.35" />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Microsoft.Extensions.Configuration" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
@"(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F\uFEFF\uFFFE\uFFFF]",
RegexOptions.Compiled);

Expand Down Expand Up @@ -61,7 +61,7 @@ private static string SimplifyScalar(object value)
{
if (value == null) return null;

return new XText(_invalidXMLChars.Replace(value.ToString(), m => "\\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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down
Loading