Skip to content

Making setOutput in SentrySDKLog.swift public to make it possible to forward logs to the JS console#7444

Open
alwx wants to merge 6 commits intomainfrom
alwx/fix/set_output
Open

Making setOutput in SentrySDKLog.swift public to make it possible to forward logs to the JS console#7444
alwx wants to merge 6 commits intomainfrom
alwx/fix/set_output

Conversation

@alwx
Copy link

@alwx alwx commented Feb 12, 2026

📜 Description

This PR adds one tiny change to the codebase — it makes setOutput in SentrySDKLog.swift public.
That's required by RN SDK (and probably other hybrid SDKs as well) in order to support log forwarding — the ability to see native logs in JS console: getsentry/sentry-react-native#5622

(there are also some formatting changes done here but they were done automatically after I ran make format)

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • Revert TelemetryScopeApplier gating of user attributes on sendDefaultPII by philprime in #7437

Internal Changes 🔧

Deps

  • Bump actions/checkout from 6.0.1 to 6.0.2 by dependabot in #7463
  • Bump getsentry/craft from 2.21.2 to 2.21.4 by dependabot in #7462
  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.21.2 to 2.21.4 by dependabot in #7461
  • Bump fastlane from 2.232.0 to 2.232.1 by dependabot in #7460
  • Bump fastlane-plugin-sentry from 2.0.0 to 2.1.0 by dependabot in #7459
  • Bump faraday from 1.10.4 to 1.10.5 by dependabot in #7446

Other

  • Making setOutput in SentrySDKLog.swift public to make it possible to forward logs to the JS console by alwx in #7444

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Fails
🚫 Please consider adding a changelog entry for the next release.

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

- Making `setOutput` in `SentrySDKLog.swift` public to make it possible to forward logs to the JS console ([#7444](https://github.com/getsentry/sentry-cocoa/pull/7444))

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 🚫 dangerJS against fc7a64f

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.307%. Comparing base (a180235) to head (fc7a64f).
⚠️ Report is 11 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
Sources/Sentry/PrivateSentrySDKOnly.m 0.000% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7444       +/-   ##
=============================================
- Coverage   85.335%   85.307%   -0.028%     
=============================================
  Files          480       480               
  Lines        28620     28621        +1     
  Branches     12376     12394       +18     
=============================================
- Hits         24423     24416        -7     
- Misses        4149      4158        +9     
+ Partials        48        47        -1     
Files with missing lines Coverage Δ
Sources/Swift/Core/Tools/SentrySDKLog.swift 100.000% <100.000%> (ø)
Sources/Sentry/PrivateSentrySDKOnly.m 73.333% <0.000%> (-0.617%) ⬇️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a180235...fc7a64f. Read the comment docs.

@alwx alwx added the ready-to-merge Use this label to trigger all PR workflows label Feb 12, 2026
Copy link
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should be set through https://github.com/getsentry/sentry-cocoa/blob/main/Sources/Sentry/Public/PrivateSentrySDKOnly.h

@alwx alwx requested a review from itaybre February 16, 2026 08:34
@alwx
Copy link
Author

alwx commented Feb 16, 2026

@itaybre done, check it out again

@alwx alwx force-pushed the alwx/fix/set_output branch from 251c364 to fc7a64f Compare February 16, 2026 09:20
Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think you need to run make generate-public-api to regenerate the sdk_api.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants