Dump settings to log when file logging is enabled

This commit is contained in:
tzugen 2023-03-21 18:41:28 +01:00
parent 46ad240306
commit 2ebb333a6e
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
2 changed files with 10 additions and 0 deletions
ultrasonic/src/main/kotlin/org/moire/ultrasonic

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

@ -775,4 +775,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}")
}
}
}