Skip to content

Rename minLogsLevel option in SentryTimberIntegration #4546

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion sentry-android-timber/api/sentry-android-timber.api
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public final class io/sentry/android/timber/SentryTimberIntegration : io/sentry/
public fun close ()V
public final fun getMinBreadcrumbLevel ()Lio/sentry/SentryLevel;
public final fun getMinEventLevel ()Lio/sentry/SentryLevel;
public final fun getMinLogsLevel ()Lio/sentry/SentryLogLevel;
public final fun getMinLogLevel ()Lio/sentry/SentryLogLevel;
public fun register (Lio/sentry/IScopes;Lio/sentry/SentryOptions;)V
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import timber.log.Timber
public class SentryTimberIntegration(
public val minEventLevel: SentryLevel = SentryLevel.ERROR,
public val minBreadcrumbLevel: SentryLevel = SentryLevel.INFO,
public val minLogsLevel: SentryLogLevel = SentryLogLevel.INFO,
public val minLogLevel: SentryLogLevel = SentryLogLevel.INFO,
) : Integration, Closeable {
private lateinit var tree: SentryTimberTree
private lateinit var logger: ILogger
Expand All @@ -31,7 +31,7 @@ public class SentryTimberIntegration(
override fun register(scopes: IScopes, options: SentryOptions) {
logger = options.logger

tree = SentryTimberTree(scopes, minEventLevel, minBreadcrumbLevel, minLogsLevel)
tree = SentryTimberTree(scopes, minEventLevel, minBreadcrumbLevel, minLogLevel)
Timber.plant(tree)

logger.log(SentryLevel.DEBUG, "SentryTimberIntegration installed.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SentryTimberIntegrationTest {
SentryTimberIntegration(
minEventLevel = minEventLevel,
minBreadcrumbLevel = minBreadcrumbLevel,
minLogsLevel = minLogsLevel,
minLogLevel = minLogsLevel,
)
}

Expand Down Expand Up @@ -90,7 +90,7 @@ class SentryTimberIntegrationTest {

assertEquals(sut.minEventLevel, SentryLevel.INFO)
assertEquals(sut.minBreadcrumbLevel, SentryLevel.DEBUG)
assertEquals(sut.minLogsLevel, SentryLogLevel.TRACE)
assertEquals(sut.minLogLevel, SentryLogLevel.TRACE)
}

@Test
Expand Down
Loading