summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2021-11-23 20:31:55 +0530
committerGitHub <noreply@github.com>2021-11-23 20:31:55 +0530
commitd129d5e580293c2696b26ae92b0a2405e7a95071 (patch)
treea6af875f7f446c7b5b903fa7b1983b0e43cf3812 /app/src/main/java
parentd7bbdce1c08134ab3d09be5cf211424f11eda53c (diff)
Ensure logger is installed when requested (#1549)
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/Application.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/Application.kt b/app/src/main/java/dev/msfjarvis/aps/Application.kt
index c0b45433..902d9b90 100644
--- a/app/src/main/java/dev/msfjarvis/aps/Application.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/Application.kt
@@ -25,6 +25,8 @@ import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.settings.runMigrations
import javax.inject.Inject
import logcat.AndroidLogcatLogger
+import logcat.LogPriority.DEBUG
+import logcat.LogcatLogger
@Suppress("Unused")
@HiltAndroidApp
@@ -41,7 +43,7 @@ class Application : android.app.Application(), SharedPreferences.OnSharedPrefere
if (BuildConfig.ENABLE_DEBUG_FEATURES ||
prefs.getBoolean(PreferenceKeys.ENABLE_DEBUG_LOGGING, false)
) {
- AndroidLogcatLogger.installOnDebuggableApp(this)
+ LogcatLogger.install(AndroidLogcatLogger(DEBUG))
StrictMode.setVmPolicy(VmPolicy.Builder().detectAll().penaltyLog().build())
StrictMode.setThreadPolicy(ThreadPolicy.Builder().detectAll().penaltyLog().build())
}