Skip to content

Update to Microsoft.Extensions.Logging 11.0 - #287

Merged
nblumhardt merged 3 commits into
serilog:devfrom
Numpsy:users/rw/net11
Nov 11, 2026
Merged

nblumhardt merged 3 commits into
serilog:devfrom
Numpsy:users/rw/net11

Conversation

@Numpsy

@Numpsy Numpsy commented Oct 24, 2026 •

Copy link
Copy Markdown
Member
  • Update version to 11.0
  • Add .NET 11.0 targets
  • Remove .NET 8.0/9.0 targets
  • Update BenchmarkdotNet (the existing version doesn't know what .NET 11 is)
  • Update Serilog to 4.4.0

@Numpsy

Numpsy commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

Currently requires a pre-release version of BenchmarkDotNet to get .NET 11.0 support

@Numpsy

Numpsy commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

fwiw, the benchmark results look somewhat faster on .NET 11, though the memory figures are identical:

BenchmarkDotNet v0.16.0-preview.2, Windows 11 (10.0.26100.33650/24H2/2024Update/HudsonValley) (Hyper-V)
Intel Core Ultra 9 285H 3.69GHz, 1 CPU, 8 logical and 8 physical cores
Memory: 24 GB Total, 15.25 GB Available

.NET SDK 11.0.100-rc.3.26522.148
  [Host]     : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3
  DefaultJob : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3
| Method                     | Mean      | Error     | StdDev    | Ratio | RatioSD | Gen0   | Allocated | Alloc Ratio |
|--------------------------- |----------:|----------:|----------:|------:|--------:|-------:|----------:|------------:|
| SerilogOnly                |  99.92 ns |  1.955 ns |  1.733 ns |  1.00 |    0.00 | 0.0126 |     160 B |        1.00 |
| SimpleEvent                | 152.53 ns |  2.931 ns |  3.706 ns |  1.53 |    0.04 | 0.0234 |     296 B |        1.85 |
| Template                   | 179.51 ns |  3.581 ns |  5.136 ns |  1.80 |    0.06 | 0.0298 |     376 B |        2.35 |
| StringScope                | 297.92 ns |  5.870 ns |  5.765 ns |  2.98 |    0.08 | 0.0730 |     920 B |        5.75 |
| TemplateScope              | 414.76 ns |  8.184 ns | 13.674 ns |  4.15 |    0.15 | 0.0920 |    1160 B |        7.25 |
| TupleScope                 | 287.61 ns |  5.549 ns |  7.779 ns |  2.88 |    0.09 | 0.0663 |     832 B |        5.20 |
| DictionaryScope            | 299.30 ns |  5.845 ns |  9.438 ns |  3.00 |    0.11 | 0.0806 |    1016 B |        6.35 |
| Capturing                  | 361.70 ns |  5.973 ns |  6.879 ns |  3.62 |    0.09 | 0.0591 |     744 B |        4.65 |
| CapturingScope             | 693.78 ns | 12.215 ns | 21.071 ns |  6.95 |    0.24 | 0.1364 |    1712 B |       10.70 |
| LogInformationScoped       | 623.25 ns | 15.164 ns | 42.272 ns |  6.24 |    0.43 | 0.1364 |    1712 B |       10.70 |
| LogInformation_WithEventId | 390.62 ns |  6.253 ns |  5.222 ns |  3.91 |    0.08 | 0.0787 |     992 B |        6.20 |


.NET SDK 11.0.100-rc.3.26522.148
  [Host]     : .NET 11.0.0 (11.0.0-rc.3.26522.148, 11.0.26.52348), X64 RyuJIT x86-64-v3
  DefaultJob : .NET 11.0.0 (11.0.0-rc.3.26522.148, 11.0.26.52348), X64 RyuJIT x86-64-v3
| Method                     | Mean      | Error     | StdDev    | Ratio | RatioSD | Gen0   | Allocated | Alloc Ratio |
|--------------------------- |----------:|----------:|----------:|------:|--------:|-------:|----------:|------------:|
| SerilogOnly                |  70.50 ns |  1.386 ns |  2.198 ns |  1.00 |    0.00 | 0.0126 |     160 B |        1.00 |
| SimpleEvent                | 121.74 ns |  2.322 ns |  2.281 ns |  1.73 |    0.06 | 0.0235 |     296 B |        1.85 |
| Template                   | 142.61 ns |  2.684 ns |  2.379 ns |  2.02 |    0.07 | 0.0298 |     376 B |        2.35 |
| StringScope                | 251.44 ns |  4.870 ns |  4.317 ns |  3.57 |    0.12 | 0.0730 |     920 B |        5.75 |
| TemplateScope              | 340.92 ns |  6.665 ns |  9.343 ns |  4.84 |    0.20 | 0.0920 |    1160 B |        7.25 |
| TupleScope                 | 232.03 ns |  4.572 ns |  5.082 ns |  3.29 |    0.12 | 0.0663 |     832 B |        5.20 |
| DictionaryScope            | 246.78 ns |  4.873 ns |  5.612 ns |  3.50 |    0.13 | 0.0806 |    1016 B |        6.35 |
| Capturing                  | 318.05 ns |  6.239 ns | 10.594 ns |  4.52 |    0.20 | 0.0591 |     744 B |        4.65 |
| CapturingScope             | 572.85 ns | 11.270 ns | 15.426 ns |  8.13 |    0.33 | 0.1364 |    1712 B |       10.70 |
| LogInformationScoped       | 570.02 ns | 11.172 ns | 18.666 ns |  8.09 |    0.36 | 0.1364 |    1712 B |       10.70 |
| LogInformation_WithEventId | 360.52 ns |  8.247 ns | 23.262 ns |  5.12 |    0.36 | 0.0787 |     992 B |        6.20 |

@nblumhardt

Copy link
Copy Markdown
Contributor

Interesting! Impressive that the .NET folks have found that much more perf to squeeze out of it, pretty much across the board :-)

@nblumhardt

Copy link
Copy Markdown
Contributor

NuGet API key has expired on dev. Unfortunately we'll need to churn our way through a switch to "trusted" publishing, to avoid the new, ludicrously-short API key lifetimes. I'll sort it out before the .NET 11 RTM.

@Numpsy

Numpsy commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

Do we want to update the Serilog references in all the 'Extensions' libraries to 4.4.0 whilst doing these updates?

@nblumhardt

Copy link
Copy Markdown
Contributor

I think that's what we've done in the past 👍 .. Helps keep the ecosystem fresh, and everyone's already taking major version updates.

- Update version to 11.0
- Add .NET 11.0 targets
- Remove .NET 8.0/9.0 targets
- Update BenchmarkdotNet (the existing version doesn't know what .NET 11 is)
@Numpsy
Numpsy marked this pull request as ready for review November 10, 2026 20:48
@nblumhardt
nblumhardt merged commit 742c1a3 into serilog:dev Nov 11, 2026
1 check passed
@Numpsy
Numpsy deleted the users/rw/net11 branch November 12, 2026 08:40
This was referenced Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants