From d129d5e580293c2696b26ae92b0a2405e7a95071 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 23 Nov 2021 20:31:55 +0530 Subject: Ensure logger is installed when requested (#1549) --- app/src/main/java/dev/msfjarvis/aps/Application.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/src') 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()) } -- cgit v1.2.3