Enable logcat logging on stable and debug builds without enabling verbose logging (#2836)

This commit is contained in:
NGB-Was-Taken
2026-01-07 22:07:52 +05:45
committed by GitHub
parent 4ce249c1a0
commit a4f5a8184c
2 changed files with 11 additions and 2 deletions
+8 -2
View File
@@ -158,8 +158,14 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
// Updates widget update
WidgetManager(Injekt.get(), Injekt.get()).apply { init(scope) }
if (!LogcatLogger.isInstalled && networkPreferences.verboseLogging().get()) {
LogcatLogger.install(AndroidLogcatLogger(LogPriority.VERBOSE))
if (!LogcatLogger.isInstalled) {
val minLogPriority = when {
networkPreferences.verboseLogging().get() -> LogPriority.VERBOSE
BuildConfig.DEBUG -> LogPriority.DEBUG
else -> LogPriority.INFO
}
LogcatLogger.install()
LogcatLogger.loggers += AndroidLogcatLogger(minLogPriority)
}
initializeMigrator()