fix(logging): Fix xLog crash (#1494)
This commit is contained in:
parent
dd3b19fa89
commit
4292b22743
1 changed files with 15 additions and 15 deletions
|
|
@ -141,13 +141,25 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
|
|||
Injekt.importModule(PreferenceModule(this))
|
||||
Injekt.importModule(AppModule(this))
|
||||
Injekt.importModule(DomainModule())
|
||||
// KMK -->
|
||||
Injekt.importModule(KMKDomainModule())
|
||||
// KMK <--
|
||||
// SY -->
|
||||
Injekt.importModule(SYPreferenceModule(this))
|
||||
Injekt.importModule(SYDomainModule())
|
||||
// SY <--
|
||||
// KMK -->
|
||||
Injekt.importModule(KMKDomainModule())
|
||||
// KMK <--
|
||||
|
||||
setupExhLogging() // EXH logging
|
||||
if (!LogcatLogger.isInstalled) {
|
||||
val minLogPriority = when {
|
||||
networkPreferences.verboseLogging().get() -> LogPriority.VERBOSE
|
||||
BuildConfig.DEBUG -> LogPriority.DEBUG
|
||||
else -> LogPriority.INFO
|
||||
}
|
||||
LogcatLogger.install()
|
||||
LogcatLogger.loggers += XLogLogcatLogger() // SY Redirect Logcat to XLog
|
||||
LogcatLogger.loggers += AndroidLogcatLogger(minLogPriority)
|
||||
}
|
||||
|
||||
setupNotificationChannels()
|
||||
|
||||
|
|
@ -213,18 +225,6 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor
|
|||
// Updates widget update
|
||||
WidgetManager(Injekt.get(), Injekt.get()).apply { init(scope) }
|
||||
|
||||
setupExhLogging() // EXH logging
|
||||
if (!LogcatLogger.isInstalled) {
|
||||
val minLogPriority = when {
|
||||
networkPreferences.verboseLogging().get() -> LogPriority.VERBOSE
|
||||
BuildConfig.DEBUG -> LogPriority.DEBUG
|
||||
else -> LogPriority.INFO
|
||||
}
|
||||
LogcatLogger.install()
|
||||
LogcatLogger.loggers += XLogLogcatLogger() // SY Redirect Logcat to XLog
|
||||
LogcatLogger.loggers += AndroidLogcatLogger(minLogPriority)
|
||||
}
|
||||
|
||||
if (!WorkManager.isInitialized()) {
|
||||
WorkManager.initialize(this, Configuration.Builder().build())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue