serilog-extensions-logging icon indicating copy to clipboard operation
serilog-extensions-logging copied to clipboard

Update README to replace UseSerilog with AddSerilog

Open brental opened this issue 1 year ago • 1 comments
trafficstars

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

brental avatar Aug 31 '24 11:08 brental

Makes sense, thanks :+1:

nblumhardt avatar Sep 03 '24 00:09 nblumhardt

Indeed, I was very confused being new to this :)

JustinGrote avatar Nov 02 '24 16:11 JustinGrote

@nblumhardt I have created #265 to address this.

brental avatar Dec 15 '24 00:12 brental