Skip to content

Commit

Permalink
Merge pull request #537 from serilog-mssql/dev
Browse files Browse the repository at this point in the history
Release 6.6.1
  • Loading branch information
ckadluba authored May 28, 2024
2 parents 8feab2d + 1b569e2 commit 499950a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 6.6.1
* Fixed issue #515: Cannot use .AuditTo with SpanId or TraceId (thanks to @Kolthor and @vui611)
* Fixed issue #530: Document default value of AllowNull
* Fixed issue #528: Wrong period in README.md sample

# 6.6.0
* Fixed issue #509: Add SqlInsertStatementWriter which uses INSERT statements instead of SqlBulkCopy (thanks to @BrettJaner)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ Numeric types use the default precision and scale. For numeric types, you are re

### AllowNull

Determines whether or not the column can store SQL `NULL` values. Some of the other features like `PrimaryKey` have related restrictions, and some of the Standard Columns impose restrictions (for example, the `Id` column never allows nulls).
Determines whether or not the column can store SQL `NULL` values. The default is true. Some of the other features like `PrimaryKey` have related restrictions, and some of the Standard Columns impose restrictions (for example, the `Id` column never allows nulls).

### DataLength

Expand Down Expand Up @@ -602,7 +602,7 @@ Keys and values are not case-sensitive. This is an example of configuring the si
"schemaName": "EventLogging",
"autoCreateSqlTable": true,
"batchPostingLimit": 1000,
"period": "0.00:00:30"
"batchPeriod": "0.00:00:30"
},
"restrictedToMinimumLevel": "Warning",
"columnOptionsSection": { . . . }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>A Serilog sink that writes events to Microsoft SQL Server and Azure SQL</Description>
<VersionPrefix>6.6.0</VersionPrefix>
<VersionPrefix>6.6.1</VersionPrefix>
<Authors>Michiel van Oudheusden;Christian Kadluba;Serilog Contributors</Authors>
<TargetFrameworks>netstandard2.0;net462;net472;net6.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public KeyValuePair<string, object> GetStandardColumnNameAndValue(StandardColumn
case StandardColumn.Level:
return new KeyValuePair<string, object>(_columnOptions.Level.ColumnName, _columnOptions.Level.StoreAsEnum ? (object)logEvent.Level : logEvent.Level.ToString());
case StandardColumn.TraceId:
return new KeyValuePair<string, object>(_columnOptions.TraceId.ColumnName, logEvent.TraceId);
return new KeyValuePair<string, object>(_columnOptions.TraceId.ColumnName, logEvent.TraceId.ToString());
case StandardColumn.SpanId:
return new KeyValuePair<string, object>(_columnOptions.SpanId.ColumnName, logEvent.SpanId);
return new KeyValuePair<string, object>(_columnOptions.SpanId.ColumnName, logEvent.SpanId.ToString());
case StandardColumn.TimeStamp:
return GetTimeStampStandardColumnNameAndValue(logEvent);
case StandardColumn.Exception:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public void GetStandardColumnNameAndValueForTraceIdReturnsLogLevelKeyValue()

// Assert
Assert.Equal("TraceId", result.Key);
Assert.Equal(traceId, result.Value);
Assert.Equal("34898a9020e0390190b0982370034f00", result.Value);
}

[Fact]
Expand All @@ -298,7 +298,7 @@ public void GetStandardColumnNameAndValueForSpanIdReturnsLogLevelKeyValue()

// Assert
Assert.Equal("SpanId", result.Key);
Assert.Equal(spanId, result.Value);
Assert.Equal("0390190b09823700", result.Value);
}

[Fact]
Expand Down

0 comments on commit 499950a

Please sign in to comment.