serilog / serilog-extensions-logging

Serilog provider for Microsoft.Extensions.Logging
Apache License 2.0
312 stars 100 forks source link

Update README to replace UseSerilog with AddSerilog #257

Open brental opened 2 weeks ago

brental commented 2 weeks ago

As part of this commit in the Serilog.AspNetCore repo the guidance for using Serilog with ASP.NET Core was changed from using builder.Host.UseSerilog to using builder.Services.AddSerilog

The README in this repo still suggests using Serilog.AspNetCore with UseSerilog so it should probably be updated to suggest using Serilog.AspNetCore with AddSerilog for ASP.NET Core. See this section: https://github.com/serilog/serilog-extensions-logging/tree/main?tab=readme-ov-file#aspnet-core-instructions

The README also suggests using Serilog.Extensions.Hosting with UseSerilog for non-web .NET Core so it should probably be updated to suggest using Serilog.Extensions.Hosting with AddSerilog for non-web .NET Core. See this section: https://github.com/serilog/serilog-extensions-logging/tree/main?tab=readme-ov-file#non-web-net-core-instructions

nblumhardt commented 1 week ago

Makes sense, thanks :+1: