Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map sentry_level_t to ELogVerbosity::Type in PrintVerboseLog. #536

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

donalmacc
Copy link
Contributor

Sentry's logging writes verbose SDK information to the default log level. I'd like to suggest mapping the sentry_level_t parameter to ELogVerbosity::Type.

Three potential things to raise here:

  • The fallback behaviour logs to the Error Category, alongside a message for an unknown sentry_level.
  • SENTRY_LEVEL_FATAL logs will shut down the app. In my testing, I've never seen a SENTRY_LEVEL_FATAL log message so I don't know what the right thing to do here is. I've mapped 1:1 to Unreal's categories, but I think logging to Error with a wrapper message might be a good idea.
  • It might be worth having a Static Log Category for SDK messages specifically, something like:

DEFINE_LOG_CATEGORY_STATIC(LogSentryNativeSdk, Display, All); and then using that just for these messages.

@tustanivsky
Copy link
Collaborator

Looks great, thank you for this contribution!

Just a few comments regarding the above points:

  • 1:1 mapping should work just fine. Recently we've introduced functionality that does the opposite conversion so extracting both things to separate utility functions will make sense as well.
  • For now we'd prefer not to introduce additional log categories to keep things consistent across different platforms.

@tustanivsky tustanivsky merged commit 3663d94 into getsentry:main Apr 11, 2024
1 check passed
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.

2 participants