Skip to content

Add Android Logs integrations #14293

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/platforms/android/integrations/logcat/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,13 @@ Learn more about manually capturing an error or message in our <PlatformLink to=
</Alert>

To view and resolve the recorded message, log into [sentry.io](https://sentry.io) and open your project. Click on the error's title to open a page where you can see error details and mark errors as resolved.

## Support With Sentry Logs

<Alert>

Sentry Logs for Logcat are supported in Sentry Android SDK version `8.17.0` and above.

</Alert>

Logcat logs at or above the `minLevel` captured by Sentry are automatically sent as <PlatformLink to="/logs/">Sentry Logs</PlatformLink>, if enabled.
18 changes: 16 additions & 2 deletions docs/platforms/android/integrations/timber/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ SentryAndroid.init(this) { options ->
// default values:
// minEventLevel = ERROR
// minBreadcrumbLevel = INFO
// minLogsLevel = SentryLogLevel.INFO,
options.addIntegration(
SentryTimberIntegration(
minEventLevel = SentryLevel.ERROR,
minBreadcrumbLevel = SentryLevel.INFO
minBreadcrumbLevel = SentryLevel.INFO,
minLogsLevel = SentryLogLevel.INFO
)
)
} else {
Expand All @@ -103,10 +105,12 @@ SentryAndroid.init(this, options -> {
// default values:
// minEventLevel = ERROR
// minBreadcrumbLevel = INFO
// minLogsLevel = SentryLogLevel.INFO,
options.addIntegration(
new SentryTimberIntegration(
SentryLevel.ERROR,
SentryLevel.INFO
SentryLevel.INFO,
SentryLogLevel.INFO
)
);
} else {
Expand Down Expand Up @@ -162,3 +166,13 @@ Learn more about manually capturing an error or message, in our <PlatformLink to
</Alert>

To view and resolve the recorded message, log into [sentry.io](https://sentry.io) and open your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.

## Support With Sentry Logs

<Alert>

Sentry Logs for Timber are supported in Sentry Android SDK version `8.17.0` and above.

</Alert>

Timber logs at or above the `minLogsLevel` captured by Sentry are automatically sent as <PlatformLink to="/logs/">Sentry Logs</PlatformLink>, if enabled.
4 changes: 2 additions & 2 deletions platform-includes/logs/integrations/android.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
We're actively working on adding more integration support for Logs. You can follow progress on the following GitHub issues or open a [new one](https://github.com/getsentry/sentry-java/issues/new/choose) for any integration you would like to see.

- [Timber](https://github.com/getsentry/sentry-java/issues/4407)
- [Logcat](https://github.com/getsentry/sentry-java/issues/4408)
- [Timber](/platforms/android/integrations/timber/)
- [Logcat](/platforms/android/integrations/logcat/)
2 changes: 1 addition & 1 deletion platform-includes/logs/requirements/android.mdx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Logs for Android are supported in Sentry Java SDK version `8.12.0` and above.
Logs for Android are supported in Sentry Android SDK version `8.12.0` and above.