From 136bd3cbe290690fb1cfa2cc84549f9011e1d7fc Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Fri, 24 Mar 2023 14:16:03 +0800 Subject: [PATCH] fix: Clean up config migration logging --- .../utils/settings/migration/ConfigMigrator.java | 3 +-- .../utils/settings/migration/MoveMigratorAction.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/settings/migration/ConfigMigrator.java b/src/main/java/com/onarandombox/MultiverseCore/utils/settings/migration/ConfigMigrator.java index c8ca6d98..3f0c9419 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/settings/migration/ConfigMigrator.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/settings/migration/ConfigMigrator.java @@ -23,9 +23,8 @@ public class ConfigMigrator { public void migrate(MVSettings settings) { double versionNumber = settings.get(versionNode); for (VersionMigrator versionMigrator : versionMigrators) { - Logging.info("Checking if config needs to be migrated from version " + versionNumber + " to " + versionMigrator.getVersion()); if (versionNumber < versionMigrator.getVersion()) { - Logging.info("Migrating config from version " + versionNumber + " to " + versionMigrator.getVersion()); + Logging.config("Migrating config from version %s to %s...", versionNumber, versionMigrator.getVersion()); versionMigrator.migrate(settings); } } diff --git a/src/main/java/com/onarandombox/MultiverseCore/utils/settings/migration/MoveMigratorAction.java b/src/main/java/com/onarandombox/MultiverseCore/utils/settings/migration/MoveMigratorAction.java index a8c8e39b..10f2ed43 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/utils/settings/migration/MoveMigratorAction.java +++ b/src/main/java/com/onarandombox/MultiverseCore/utils/settings/migration/MoveMigratorAction.java @@ -20,12 +20,11 @@ public class MoveMigratorAction implements MigratorAction { @Override public void migrate(MVSettings settings) { - Logging.info(String.valueOf(settings.getConfig().get(fromPath))); Optional.ofNullable(settings.getConfig().get(fromPath)) .ifPresent(value -> { - Logging.info("Moving " + fromPath + " to " + toPath); settings.getConfig().set(toPath, value); settings.getConfig().set(fromPath, null); + Logging.config("Moved path %s to %s", fromPath, toPath); }); } }