Skip to content

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
@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