Skip to content

Commit

Permalink
Disable Sentry debug logs (#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
XanderZhu authored Dec 21, 2023
1 parent 041318e commit 359f30a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.hyperskill.app.android.sentry.domain.model.manager

import io.sentry.Sentry
import io.sentry.SentryLevel
import io.sentry.SpanStatus
import io.sentry.android.core.SentryAndroid
import io.sentry.android.fragment.FragmentLifecycleIntegration
Expand Down Expand Up @@ -37,11 +38,11 @@ class SentryManagerImpl(
enableAutoFragmentLifecycleTracing = true
)
)
options.setDiagnosticLevel(minLogLevel.toSentryLevel())

if (BuildConfig.DEBUG) {
options.setDebug(true)
options.tracesSampleRate = 1.0
options.setDiagnosticLevel(SentryLevel.INFO)
} else {
options.setDebug(false)
options.tracesSampleRate = 0.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ final class SentryManager: shared.SentryManager {

#if DEBUG
options.debug = true
options.diagnosticLevel = .debug
options.diagnosticLevel = .info

options.tracesSampleRate = 1
#else
options.tracesSampleRate = 0.3
options.diagnosticLevel = .info
#endif

// HTTP Client Errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fun <State, Message, Action> StateReducer<State, Message, Action>.wrapWithLogger
buildVariant: BuildVariant,
logger: Logger,
tag: String,
severity: Severity = Severity.Debug
severity: Severity = Severity.Info
): StateReducer<State, Message, Action> =
if (buildVariant == BuildVariant.RELEASE) {
this
Expand Down

0 comments on commit 359f30a

Please sign in to comment.