79418255

Date: 2025-02-06 14:17:38
Score: 2
Natty:
Report link

There's no longer any difference, as mentioned in the comments section here: https://nblumhardt.com/2024/04/serilog-net8-0-minimal/#comment-6496448401

and in the source code here: https://github.com/serilog/serilog-extensions-hosting/blob/dev/src/Serilog.Extensions.Hosting/SerilogHostBuilderExtensions.cs

enter image description here

@Nicholas Blumhardt what is the difference builder.Services.AddSerilog(); and builder.Host.UseSerilog()?

Nicholas Blumhardt: There's no longer any difference between these; the Services option is the more recent one, and the Host one just forwards to it.

Reasons:
  • Probably link only (1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • User mentioned (1): @Nicholas
  • High reputation (-1):
Posted by: Mike Haas