Skip to content

Conversation

mujacica
Copy link
Contributor

@mujacica mujacica commented Sep 25, 2025

  • Added support for Structured Logging in Unreal
  • Integrated with Java/Cocoa/Native SDK features
  • Added support for OnBeforeLog hook

Note

Adds structured logging across Android, Apple, and Native platforms with a new beforeLog hook, log APIs, settings, and output-device integration.

  • Structured Logging (all platforms)
    • Add AddLog API to ISentrySubsystem and platform subsystems (Android/Apple/Native); route level-specific logs to SDKs.
    • Introduce beforeLog/BeforeSendLog callbacks (JNI/Cocoa/Native) and wire through bridges (SentryBridgeJava, JNI, Cocoa options).
    • Enable SDK logging via platform options (options.getLogs().setEnabled, options.enableLogs, sentry_options_set_enable_logs).
  • Core API
    • New ISentryLog and USentryLog types; new USentryBeforeLogHandler for pre-processing logs.
    • Extend ISentrySubsystem::InitWithSettings to accept USentryBeforeLogHandler*.
  • Settings
    • Add EnableStructuredLogging, category filters, per-level forwarding (FStructuredLoggingLevels), and "Also send breadcrumbs" toggle; propagate to platform init.
  • Output Device
    • Update FSentryOutputDevice to forward UE_LOG to structured logging (with category filtering) and optionally send breadcrumbs.
  • Android/Apple/Native internals
    • Add platform-specific log wrappers (FAndroidSentryLog, FAppleSentryLog, FGenericPlatformSentryLog) and HAL includes.
    • Add Java bridge methods for level-specific logging; Cocoa and Native use logger APIs.
  • Misc
    • Update packaging scripts/snapshots and CHANGELOG entry for the new feature.

Written by Cursor Bugbot for commit 2bf68e8. This will update automatically on new commits. Configure here.

Copy link
Contributor

github-actions bot commented Sep 25, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 2bf68e8

@mujacica mujacica marked this pull request as ready for review September 26, 2025 13:26
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@mujacica mujacica force-pushed the feat_structured_logs branch from 24ef528 to 5b950d9 Compare September 26, 2025 14:13
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@mujacica
Copy link
Contributor Author

Hey @nwhite-riot, thanks for taking a look! I will address your code comments in the next rev, but on a more general note: yes we want this enabled on consoles too, but what was meant with “all platforms” is all platforms in this repo. As soon as this PR is done, I am going to follow up with all console plugin integrations in other repos (breaking changes for init).

Regarding naming: as you might see I was trying different things out, but sticking with one name makes more sense. I will think about it a little more.

@mujacica mujacica force-pushed the feat_structured_logs branch from 3f3a37d to af7659c Compare September 27, 2025 07:38
cursor[bot]

This comment was marked as outdated.

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.

4 participants