Skip to content

UsingSerilogWithMicrosoftILogger: retarget net10.0, add request logging - #2134

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/109589-aspnetcore-using-serilog-with-microsofts-ilogger-api
Open

UsingSerilogWithMicrosoftILogger: retarget net10.0, add request logging#2134
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/109589-aspnetcore-using-serilog-with-microsofts-ilogger-api

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Retargets dotnet-logging/UsingSerilogWithMicrosoftILogger to net10.0 for the article refresh.

  • Both projects net8.0 -> net10.0
  • Serilog.AspNetCore 8.0.1 -> 10.0.0, Swashbuckle.AspNetCore 6.4.0 -> 10.2.3
  • Adds app.UseSerilogRequestLogging() and the Microsoft.AspNetCore minimum-level override recommended by the Serilog.AspNetCore readme, so one request logs a single summary event instead of seven framework events

Build clean, 1/1 test passing on SDK 10.0.302 / runtime 10.0.10.

Retarget both projects to net10.0. Bump Serilog.AspNetCore 8.0.1 -> 10.0.0
and Swashbuckle.AspNetCore 6.4.0 -> 10.2.3 so the sample restores on the
current SDK. Add UseSerilogRequestLogging() to the pipeline plus the
Microsoft.AspNetCore minimum-level override the Serilog.AspNetCore readme
recommends, so a request produces one summary event instead of seven
framework events.
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.

1 participant