-
-
Notifications
You must be signed in to change notification settings - Fork 451
Send logcat through Sentry Logs #4487
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
base: main
Are you sure you want to change the base?
Conversation
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d035656 | 399.04 ms | 416.73 ms | 17.69 ms |
771a432 | 410.52 ms | 458.84 ms | 48.32 ms |
2e00745 | 440.67 ms | 489.81 ms | 49.14 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d035656 | 1.58 MiB | 2.08 MiB | 511.32 KiB |
771a432 | 1.58 MiB | 2.08 MiB | 511.32 KiB |
2e00745 | 1.58 MiB | 2.09 MiB | 518.68 KiB |
sentry-android-core/src/main/java/io/sentry/android/core/SentryLogcatAdapter.java
Show resolved
Hide resolved
return Log.e(tag, msg, tr); | ||
} | ||
|
||
public static int wtf(@Nullable String tag, @Nullable String msg) { | ||
addAsBreadcrumb(tag, SentryLevel.ERROR, msg); | ||
addAsLog(SentryLogLevel.FATAL, msg, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not too sure about the log level here.
should we use error instead of fatal?
sentry-android-core/src/main/java/io/sentry/android/core/SentryLogcatAdapter.java
Show resolved
Hide resolved
# Conflicts: # CHANGELOG.md
Hi, this is a feature I am quite keen on, so just dropping some useful (easy to add?) additions
|
hi @ishanzuaim, and thanks for the interest! You can already set the minimum logging level in the gradle plugin options following the logcat integration documentation
We'll discuss how to best send the tag in the logs, too! |
📜 Description
SentryLogcatAdapter now forwards output to Sentry Logs, if enabled
💡 Motivation and Context
Closes #4408
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps