Enhance logging documentation for Microsoft.Extensions.Logging#17506
Open
Enhance logging documentation for Microsoft.Extensions.Logging#17506
Conversation
…Logging integration - Added detailed instructions for configuring logging filters with Microsoft.Extensions.Logging. - Clarified the behavior of `EnableLogs` and its interaction with Sentry's logging capabilities. - Included code examples for both JSON configuration and programmatic filter setup. - Updated initialization instructions to specify that `EnableLogs` must be set to true for logging to function correctly.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Flash0ver
reviewed
Apr 29, 2026
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
KyleTryon
commented
Apr 29, 2026
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.
This pull request updates the .NET logging documentation to clarify how to enable and configure logging integration with Sentry, especially for applications using
Microsoft.Extensions.Logging. The changes provide clearer guidance on how logs are filtered, how theEnableLogsoption interacts with different logging APIs, and how Sentry respects existing logging configurations.Improvements to logging setup and configuration:
EnableLogs = trueenables both theSentrySdk.LoggerAPIs and supported platform logging integrations (e.g.,Microsoft.Extensions.Logging, Serilog), but does not captureConsole.WriteLine()output.Microsoft.Extensions.Loggingfilters to control which logs are sent to Sentry, including code samples forappsettings.jsonand in-code filter configuration.Clarifications on logging behavior:
Microsoft.Extensions.Loggingcategory and provider configurations, ensuring log filtering and disabling can be managed using standard .NET logging configuration. [1] [2]SetBeforeSendLogfor filtering or updating logs before they are sent to Sentry.