1
0
Fork 0

Fix logging

main
Mari 4 years ago
parent 2ba589c355
commit 1f59246628
  1. 4
      src/main/kotlin/net/deliciousreya/minecraftportal/model/PortalDataStore.kt

@ -99,9 +99,9 @@ class PortalDataStore (val logger: Logger) {
throw DeserializationException(cause = firstException ?: e)
}
}
logger.info("Saving data to $saveDataTo and using $useBackup as backup")
this.saveDataTo = mainFile
this.useBackup = backupFile
logger.info("Saving data to ${saveDataTo?.path} and using ${useBackup?.path} as backup")
}
fun validateWorldOnStartup(logger: Logger) {
@ -157,8 +157,8 @@ class PortalDataStore (val logger: Logger) {
}
fun onAfterChanged() {
logger.info("Saving data to $saveDataTo and using $useBackup as backup...")
val destination = saveDataTo ?: return
logger.info("Saving updated data to $saveDataTo...")
val tempDestination = File.createTempFile("PortalSaveData", ".tmp.binproto")
val backupDestination = useBackup
if (backupDestination != null && destination.exists()) {

Loading…
Cancel
Save