Skip to content

Releases: serilog/serilog

v3.1.1

10 Nov 12:43
999d686
Compare
Choose a tag to compare
  • #1977 - don't stack overflow when disposing ReusableStringWriter with large renderings (@nblumhardt)

This is a bugfix for release 3.1.0.

v3.1.0

09 Nov 06:15
765a046
Compare
Choose a tag to compare

Built-in trace and span id support

This release adds two new first-class properties to LogEvent: TraceId and SpanId. These are set automatically in Logger.Write() to the corresponding property values from System.Diagnostics.Activity.Current.

The major benefit of this change is that sinks, once updated, can reliably propagate trace and span ids through to back-ends that support them (in much the same way that first-class timestamps, messages, levels, and exceptions are used today).

The sinks maintained under serilog/serilog, along with formatting helpers such as Serilog.Formatting.Compact and Serilog.Expressions, are already compatible with this change or have pending releases that add compatibility.

Dropped .NET Core 2.1 and 3.0 support

On .NET Core 2.1 and 3.0, projects targeting Serilog 3.1+ will fail to build, with:

/project/packages/system.runtime.compilerservices.unsafe/6.0.0/buildTransitive/netcoreapp2.0
/System.Runtime.CompilerServices.Unsafe.targets(4,5): error : System.Runtime.CompilerServices.Unsafe
doesn't support netcoreapp2.1. Consider updating your TargetFramework to netcoreapp3.1 or later.

Affected consumers should continue to use Serilog 3.0 or earlier. See #1983 for a discussion of this issue.

Technical breaking change

Trace and span id collection includes support for {TraceId} and {SpanId} placeholders in output templates (commonly used when formatting text log files). Where previously these names resolved to user-defined properties, they now resolve to the built-in LogEvent.TraceId and LogEvent.SpanId values, respectively.

Impact is expected to be low/zero, because the trace and span id values in any user-added properties are almost certainly identical to the built-in ones.

v3.0.1

21 Jun 21:48
5e93f0d
Compare
Choose a tag to compare

v3.0.0

19 Jun 23:01
7c395b6
Compare
Choose a tag to compare

What's new in 3.0.0?

Target framework changes - Serilog no longer targets netstandard1.x or .NET Framework versions earlier than .NET 4.6.2. Users on affected frameworks should continue to target Serilog 2.12.x.

Removed obsolete APIs - Many deprecated/obsolete types and functions have been removed. Notably, JsonFormatter can no longer be subclassed (either port to JsonValueFormatter, use Serilog.Expressions, or copy the original JsonFormatter code into your project).

Added APIs - LevelAlias.Off is now provided as an equivalent to Microsoft.Extensions.Logging's LogLevel.Off; Destructure.AsDictionary<T>() can now be used to mark dictionary types.

Fewer allocations on many hot paths - A lot of work has gone into avoiding heap allocations wherever possible.

Changes

Read more

v2.12.0

13 Sep 04:20
9f86301
Compare
Choose a tag to compare

Highlights of 2.12.0

Improved and expanded <Nullable>enable</Nullable> support

A huge number of commits have gone into completing and refining non-null reference type annotations, which now cover the entire public Serilog API. The Serilog project itself now builds with non-null reference type checking globally enabled 🎉

IAsyncDisposable support

Sinks that need to flush changes using asynchronous APIs can now implement IAsyncDisposable and prevent the possibility of deadlocking while waiting for tasks to complete.

To drive this, Logger can now be disposed via using async:

await using var log = new LoggerConfiguration().CreateLogger();

and the Log class provides Log.CloseAndFlushAsync():

await Log.CloseAndFlushAsync();

DateOnly and TimeOnly support

The DateOnly and TimeOnly types introduced in .NET 6 are now correctly handled as scalar values when capturing.

Merged PRs

v2.11.0

24 Apr 00:10
da16aea
Compare
Choose a tag to compare

v2.10.0

10 Sep 02:26
24b67c6
Compare
Choose a tag to compare

v2.9.0

13 Oct 21:09
655778f
Compare
Choose a tag to compare

v$(appveyor_build_version)

10 Sep 02:29
655778f
Compare
Choose a tag to compare
Merge pull request #1369 from serilog/dev

2.9.0 Release

v2.8.0

16 Jan 23:30
870feca
Compare
Choose a tag to compare
  • #1179 - support for Destructure.AsScalar(type) in key-value settings (@tsimbalar)
  • #1174 - partial support for Destructure.Xxx() in key-value settings (@tsimbalar)
  • #1192 - support for Destructure.With(policy) in key-value settings (@tsimbalar)
  • #1189 - renew certificate to fix UWP integration tests (@skomis-mm)
  • #1197 - make it simple to compare Logger.Instance with Logger.None (@ie-zero)
  • #1198 - support *.With(...) and AuditTo.Sink(sink)/WriteTo.Sink(sink) in key-value settings (@tsimbalar)
  • #1220 - include repositoryUrl in the NuGet package (@MaximRouiller)
  • #1233 - fix padding of non-string values in output templates (@nblumhardt)
  • #1169 - update performance tests to netcoreapp2.0 (@merbla)
  • #1234 - add tests for custom IFormatProvider support (@tsimbalar)
  • #1236 - fix failure/exception thrown when calling ForContext() to destructure some generated proxy types (@balayoglu)
  • #1269 - add netstandard2.0 target to shrink dependency graph on compatible platforms (@nblumhardt)