Skip to content

Update README to replace UseSerilog with AddSerilog #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brental opened this issue Aug 31, 2024 · 3 comments · Fixed by #265
Closed

Update README to replace UseSerilog with AddSerilog #257

brental opened this issue Aug 31, 2024 · 3 comments · Fixed by #265

Comments

@brental
Copy link
Contributor

brental commented Aug 31, 2024

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
Copy link
Member

Makes sense, thanks 👍

@JustinGrote
Copy link

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

@brental
Copy link
Contributor Author

brental commented Dec 15, 2024

@nblumhardt I have created #265 to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants