Skip to content
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

README and sample updates to match recent .NET hosting models #370

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

nblumhardt
Copy link
Member

Fixes #368

  • In all app models, UseSerilog is replaced with IServiceCollection.AddSerilog() - this works with WebApplicationBuilder and IHostApplicationBuilder (generic host).
  • Removed writeToProviders from the README as there are enough breadcrumbs out there for people to find if they really need this, it's only required in very rare and undesirable scenarios.
  • Blanket suppression of Microsoft.AspNetCore sources is no longer recommended; switched this for a handful of more targeted suppressions

@nblumhardt
Copy link
Member Author

Not too much to review here, I'll send this through as the current README's looking pretty outdated 😅

@nblumhardt nblumhardt merged commit cd8662f into serilog:dev Apr 5, 2024
1 check passed
@jcasale
Copy link

jcasale commented Apr 5, 2024

I think the comment in the sample is out of date, it still references UseSerilog().

@nblumhardt
Copy link
Member Author

Fixed, thanks @jcasale

@nblumhardt nblumhardt mentioned this pull request Jul 12, 2024
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.

Update README.md example to show builder.Services.AddSerilog() in a minimal API project
2 participants