Skip to content

Upgrading Serilog 3 to 4

Breaking3.1.1 → 4.4.0Breaking4New10Changed14Fixed8Other9

Fetching 71 releases from GitHub…40 / 71
BreakingUpgrade verdict

4 breaking changes.

  • If you rely on the buffering time limit to control how long failed batches are retried, that no longer works; set the new retry time limit instead.
  • On .NET Framework, the library's internal version number now changes with each release, so apps may need updated binding redirects.
  • Level override settings now ignore letter case, so differently-cased names match the same level.
  • Output templates now treat UtcTimestamp as a reserved token, which can change how existing templates render.
Top 3 of 4 that need code or config changes

Target frameworks requirement changed in 4.3.1-dev-02395: .NETFramework4.6.2, .NETFramework4.7.1, .NETStandard2.0, .NETStandard2.1, net5.0, net6.0, net7.0 → .NETFramework4.6.2, .NETFramework4.7.1, .NETStandard2.0, net10.0, net6.0, net8.0, net9.0.

Breaking4
Changes IBatchedLogEventSink batch retry scheduling; BufferingTimeLimit no longer implicitly extends or reduces retry time.
IBatchedLogEventSinkBufferingTimeLimitBatchingOptions.RetryTimeLimit
Unpins the assembly version so it matches the package version instead of the historical 2.0.0 default.
Uses case-insensitive matching for level overrides.
Recognizes UtcTimestamp as a built-in token in output templates.
UtcTimestamp