sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

feat(logs): when Debug is true then SDK-Logger also prints to the Console

Open Flash0ver opened this issue 1 month ago • 1 comments

See also https://develop.sentry.dev/sdk/telemetry/logs/.

Other

If debug is set to true in SDK init, calls to the Sentry logger API should also print to the console with the appropriate log level. This will help debugging logging setups.


CHANGES

  • When SentryOptions.Debug is enabled and a SentryLog is captured via the SDK-Logger-APIs, but not filtered via BeforeSendLog, then also print the message to the standard output stream.

TODO

  • also write to Trace/Listeners
    • in which cases?
  • CHANGELOG entry

Flash0ver avatar Dec 02 '25 18:12 Flash0ver

Fails
:no_entry_sign: Please consider adding a changelog entry for the next release.
Messages
:book: Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- when Debug is true then SDK-Logger also prints to the Console ([#4785](https://github.com/getsentry/sentry-dotnet/pull/4785))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by :no_entry_sign: dangerJS against 5870b3911c8c1363e06a3b79084d9495cf0d8f02

github-actions[bot] avatar Dec 02 '25 18:12 github-actions[bot]