👋 Howdy! I hope you’re enjoying the, frankly, pretty fantastic state of structured logging in .NET these days. If you’re using Serilog then I hope you’ve also been enjoying the long period of stability we’ve maintained on the 2.x release series (I don’t want to rewrite my application logging every eighteen months, either 🙂).

While we’ve been keeping Serilog fresh, it’s time to make some minor breaking changes, particularly in the target frameworks and library versions that the mainline Serilog packages will support. A few interesting things are coming in the next month or so, and so here’s a quick run through what to expect from the Serilog project going into mid-2023.

Serilog 3.0 progress

Serilog 3.0 is coming together and should be finalized soon. It drops support for several ancient .NET versions and some long-unsupported minor releases. The directly-targeted frameworks are now:

  • netstandard2.0 and netstandard2.1
  • net462, net47, and net471
  • net5.0, net6.0, and net7.0

This leaves .NET Framework versions prior to 4.6.2, and .NET Core versions prior to 2.0, on the 2.x series of Serilog releases. The vast majority of sinks will remain compatible with both Serilog 2.x and 3.x so please don’t feel unloved if you’re maintaining an application that can’t move forward for one reason or another.

3.0 also includes a large number of performance improvements, bug fixes, and full support for as much of modern .NET as we can reach. You can try it out now! Grab the latest pre-release version from NuGet with:

dotnet add package Serilog --prerelease

All feedback and bug reports — especially any compatibility problems! — are welcome over on the project issue tracker.

Updated versioning for Microsoft.Extensions.* dependent packages

The following packages are about to ship 7.0.0 versions, and will match both the version (major and minor) and target framwork support of their matching Microsoft.Extensions.* packages:

  • Serilog.Extensions.Logging (tracks Microsoft.Extensions.Logging)
  • Serilog.Extensions.Hosting (tracks Microsoft.Extensions.Hosting)
  • Serilog.AspNetCore (also tracks Microsoft.Extensions.Hosting, via its Serilog.Extensions.Hosting dependency)
  • Serilog.Settings.Configuration (tracks Microsoft.Extensions.Configuration)

This means that, while you can use Serilog.Extensions.* v7 packages on a wide range of .NET versions, they’ll always depend on the same (v7) underlying versions of the corresponding Microsoft.* libraries. When Microsoft.Extensions.* v8 packages ship, we’ll simultaneously release v8 packages, too.

All up, this should make using the Serilog platform extensions packages more predictable, and result in fewer dependency resolution problems or security scanner false-positives.

Serilog.Sinks.OpenTelemetry 1.0.0 RC

OpenTelemetry includes a standardized protocol for transmitting structured log events. Our aim for Serilog.Sinks.OpenTelemetry v1 is to provide first-class support for connecting Serilog to back-ends that might not have dedicated or well-maintained Serilog integrations today.

The 1.0.0-dev-* packages on NuGet have reached “release candidate” status; if you have applications instrumented with Serilog, and a collector that supports the OpenTelemetry Logs protocol, your feedback and questions over in the project repository would be most welcome.

Who is to thank for all this?

Only the tiniest slice of all this is my own work; listing everyone’s contributions will have to wait for the release notes, but I should call out that some very talented and generous programmers are behind this latest push forwards. If you have the time and inclination to get involved in the Serilog project, you can find repositories for all of these packages under https://github.com/serilog.