Skip to content

LoggingAPI: .NET 10, disposed logger factory, message templates, in-memory provider - #2346

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/62623-dotnet-ilogger-iloggerfactory-iloggerprovider
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/62623-dotnet-ilogger-iloggerfactory-iloggerprovider

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves dotnet-logging/LoggingAPI to net10.0 with Microsoft.Extensions.Logging 10.0.14, declares the ILoggerFactory with using so the console provider flushes before the app exits, switches the Student and Department log calls to message templates, adds an InMemoryLoggerProvider, and replaces the NSubstitute tests with tests that assert on that provider's messages, plus a minimum-level test and a test that resolves ILogger from a generic host (MSTest 4.5.2).

…templates

Retarget both projects to net10.0 with Microsoft.Extensions.Logging 10.0.14. Program.cs uses top-level statements and declares the ILoggerFactory with using so the console provider flushes before exit. Student and Department log through message templates. Adds InMemoryLoggerProvider and replaces the NSubstitute tests with tests that assert on its messages, plus a minimum-level test and a host test (MSTest 4.5.2, Microsoft.Extensions.Hosting 10.0.14).
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