Enable logcat logging on stable and debug builds without enabling verbose logging (#2836)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user