Repository navigation
feat: use Microsoft.Extensions.Logging.ILogger - #758
Merged
Deadpikle merged 2 commits intoNov 25, 2026
Merged
Conversation
Member
|
Looks good to me in principle. Great change/addition. What do you think about adding a link to |
Contributor
Author
|
Done! I've added examples to both the WinForms and WPF samples. |
Member
|
Thanks much! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem with custom Sparkle logging was that it wasn't enough:
Today, the de facto standard is to use Microsoft's ILogger.
Microsoft provides many services that allow users to choose which ones to use through separate NuGet packages:
https://learn.microsoft.com/en-us/dotnet/core/extensions/logging/providers
For even more advanced cases there are many NuGet packages—logging frameworks other than Microsoft's—that are also built on top of it.
Here's what I've done:
• Replaces NetSparkle’s custom logger with Microsoft.Extensions.Logging.ILogger.
• Removes LogWriter and the custom logging interfaces and options.
• Leaves logging provider configuration to the application.
• Renames LogWriter-related properties to Logger and documents this breaking change in UPGRADING.md.
• Updates samples and tests, and upgrades Microsoft.Extensions.Logging.Abstractions to 10.0.15.
• Improves logging with structured message templates, exception details, and appropriate log levels; removes redundant level and category prefixes.
More information: https://learn.microsoft.com/en-us/dotnet/core/extensions/logging/overview?tabs=command-line