Merge branch 'dumpConfig' into 'develop'

Dump settings to log when file logging is enabled

Closes #891

See merge request ultrasonic/ultrasonic!934
This commit is contained in:
birdbird 2023-03-31 12:35:07 +00:00
commit cb781cb76d
2 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class UApp : MultiDexApplication() {
ioScope.launch {
if (Settings.debugLogToFile) {
FileLoggerTree.plantToTimberForest()
Util.dumpSettingsToLog()
}
isFirstRun = Util.isFirstRun()
}

View File

@ -823,4 +823,13 @@ object Util {
stopForeground(true)
}
}
fun dumpSettingsToLog() {
Timber.d("Current user preferences")
Timber.d("========================")
val keys = Settings.preferences.all
keys.forEach {
Timber.d("${it.key}: ${it.value}")
}
}
}