From 27865dc7858c8132b599d495d2cc515c25fa5dea Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Sun, 17 Oct 2021 14:50:42 +0200 Subject: [PATCH] chore: Exchange debug log levels & component-ify a few messages (#1342) --- .../bukkit/adapter/BukkitQueueHandler.java | 1 - .../bukkit/listener/ChunkListener.java | 3 +-- .../bukkit/regions/GriefPreventionFeature.java | 2 +- .../regions/plotsquared/PlotSquaredFeature.java | 6 ++++-- .../regions/plotsquaredv4/PlotSquaredFeature.java | 8 ++++---- .../core/command/tool/brush/InspectBrush.java | 4 +--- .../core/configuration/Config.java | 12 +++++++----- .../core/extension/platform/binding/Bindings.java | 2 +- .../extent/clipboard/io/FastSchematicReader.java | 2 +- .../core/history/RollbackOptimizedHistory.java | 2 +- .../core/history/change/MutableEntityChange.java | 4 ++-- .../core/history/changeset/AbstractChangeSet.java | 2 +- .../com/fastasyncworldedit/core/util/MainUtil.java | 6 +++--- .../com/fastasyncworldedit/core/util/WEManager.java | 4 ---- .../main/java/com/sk89q/worldedit/EditSession.java | 2 +- .../com/sk89q/worldedit/command/RegionCommands.java | 2 +- .../sk89q/worldedit/command/SchematicCommands.java | 2 +- .../com/sk89q/worldedit/command/ToolCommands.java | 2 +- .../sk89q/worldedit/command/WorldEditCommands.java | 4 ++-- .../main/java/com/sk89q/worldedit/entity/Player.java | 6 +++--- .../extension/platform/PlatformCommandManager.java | 4 ++-- .../worldedit/extent/AbstractDelegateExtent.java | 2 +- .../extent/clipboard/io/SpongeSchematicReader.java | 2 +- .../worldedit/internal/SchematicsEventListener.java | 2 +- .../sk89q/worldedit/internal/anvil/ChunkDeleter.java | 6 +++--- .../worldedit/world/registry/BundledBlockData.java | 2 +- .../worldedit/world/registry/BundledItemData.java | 2 +- .../sk89q/worldedit/world/registry/LegacyMapper.java | 5 +++-- 28 files changed, 49 insertions(+), 52 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/BukkitQueueHandler.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/BukkitQueueHandler.java index d613f2279..f3e9e16e7 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/BukkitQueueHandler.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/BukkitQueueHandler.java @@ -42,7 +42,6 @@ public class BukkitQueueHandler extends QueueHandler { if (timingsEnabled) { if (alertTimingsChange) { alertTimingsChange = false; - LOGGER.debug("Having `parallel-threads` > 1 interferes with the timings."); } Timings.setTimingsEnabled(false); timingsCheck.invoke(null); diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener.java index 7d38635ed..361044056 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/listener/ChunkListener.java @@ -61,8 +61,7 @@ public abstract class ChunkListener implements Listener { TaskManager.IMP.repeat(() -> { Location tmpLoc = lastCancelPos; if (tmpLoc != null) { - LOGGER.debug("[FAWE Tick Limiter] Detected and cancelled physics lag source at " - + tmpLoc); + LOGGER.info("[FAWE Tick Limiter] Detected and cancelled physics lag source at {}", tmpLoc); } rateLimit--; physicsFreeze = false; diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/GriefPreventionFeature.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/GriefPreventionFeature.java index 70ccf1625..00e6f3f23 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/GriefPreventionFeature.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/GriefPreventionFeature.java @@ -22,7 +22,7 @@ public class GriefPreventionFeature extends BukkitMaskManager implements Listene public GriefPreventionFeature(final Plugin griefpreventionPlugin) { super(griefpreventionPlugin.getName()); - LOGGER.debug("Plugin 'GriefPrevention' found. Using it now."); + LOGGER.info("Plugin 'GriefPrevention' found. Using it now."); } public boolean isAllowed(Player player, Claim claim, MaskType type) { diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/PlotSquaredFeature.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/PlotSquaredFeature.java index 99f71b8dc..e45b7ed3e 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/PlotSquaredFeature.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquared/PlotSquaredFeature.java @@ -39,17 +39,19 @@ public class PlotSquaredFeature extends FaweMaskManager { public PlotSquaredFeature() { super("PlotSquared"); - LOGGER.debug("Optimizing PlotSquared"); + LOGGER.info("Optimizing PlotSquared"); if (Settings.FAWE_Components.FAWE_HOOK) { Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS = false; if (Settings.PLATFORM.toLowerCase(Locale.ROOT).startsWith("bukkit")) { new FaweTrim(); } + // TODO: revisit this later on - when? + /* if (MainCommand.getInstance().getCommand("generatebiome") == null) { new PlotSetBiome(); } + */ } - // TODO: revisit this later on /* try { if (Settings.Enabled_Components.WORLDS) { diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquaredv4/PlotSquaredFeature.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquaredv4/PlotSquaredFeature.java index 571eb0402..0d5fa5b7c 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquaredv4/PlotSquaredFeature.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/plotsquaredv4/PlotSquaredFeature.java @@ -41,7 +41,7 @@ public class PlotSquaredFeature extends FaweMaskManager { public PlotSquaredFeature() { super("PlotSquared"); - LOGGER.debug("Optimizing PlotSquared"); + LOGGER.info("Optimizing PlotSquared"); if (com.fastasyncworldedit.core.configuration.Settings.IMP.ENABLED_COMPONENTS.PLOTSQUARED_v4_HOOK) { Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS = false; try { @@ -49,7 +49,7 @@ public class PlotSquaredFeature extends FaweMaskManager { setupSchematicHandler(); setupChunkManager(); } catch (Throwable ignored) { - LOGGER.debug("Please update PlotSquared: https://www.spigotmc.org/resources/77506/"); + LOGGER.info("Please update PlotSquared: https://www.spigotmc.org/resources/77506/"); } if (Settings.PLATFORM.toLowerCase(Locale.ROOT).startsWith("bukkit")) { new FaweTrim(); @@ -85,12 +85,12 @@ public class PlotSquaredFeature extends FaweMaskManager { private void setupChunkManager() throws RuntimeException { ChunkManager.manager = new FaweChunkManager(ChunkManager.manager); - LOGGER.debug(" - ChunkManager: " + ChunkManager.manager); + LOGGER.info(" - ChunkManager: {}", ChunkManager.manager); } private void setupSchematicHandler() throws RuntimeException { SchematicHandler.manager = new FaweSchematicHandler(); - LOGGER.debug(" - SchematicHandler: " + SchematicHandler.manager); + LOGGER.info(" - SchematicHandler: {}", SchematicHandler.manager); } public boolean isAllowed(Player player, Plot plot, MaskType type) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/InspectBrush.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/InspectBrush.java index 898e94266..d9f11976a 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/InspectBrush.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/command/tool/brush/InspectBrush.java @@ -65,8 +65,7 @@ public class InspectBrush extends BrushTool { public boolean perform(final Player player, LocalSession session, boolean rightClick) { if (!player.hasPermission("worldedit.tool.inspect")) { - player.print(Caption.of("", "worldedit.tool.inspect")); - LOGGER.debug("No tool control"); + player.print(Caption.of("fawe.error.no-perm", "worldedit.tool.inspect")); return false; } if (!Settings.IMP.HISTORY.USE_DATABASE) { @@ -74,7 +73,6 @@ public class InspectBrush extends BrushTool { "fawe.error.setting.disable", "history.use-database (Import with /history import )" )); - LOGGER.debug("No db"); return false; } try { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Config.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Config.java index 55a2aa9d6..7d786177f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Config.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/configuration/Config.java @@ -47,7 +47,7 @@ public class Config { } } } - LOGGER.debug("Failed to get config option: " + key); + LOGGER.error("Failed to get config option: {}", key); return null; } @@ -78,7 +78,7 @@ public class Config { } } } - LOGGER.debug("Failed to set config option: " + key + ": " + value + " | " + instance + " | " + root.getSimpleName() + ".yml"); + LOGGER.error("Failed to set config option: {}: {} | {} | {}.yml", key, value, instance, root.getSimpleName()); } public boolean load(File file) { @@ -343,9 +343,11 @@ public class Config { setAccessible(field); return field; } catch (Throwable ignored) { - LOGGER.debug("Invalid config field: " + StringMan.join(split, ".") + " for " + toNodeName(instance - .getClass() - .getSimpleName())); + LOGGER.warn( + "Invalid config field: {} for {}", + StringMan.join(split, "."), + toNodeName(instance.getClass().getSimpleName()) + ); return null; } } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/Bindings.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/Bindings.java index bd0120354..fa21a31b5 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/Bindings.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/Bindings.java @@ -59,7 +59,7 @@ public class Bindings { Annotation annotation = annotations[0] == binding ? annotations[1] : annotations[0]; key = Key.of(ret, annotation); } else { - LOGGER.debug("Cannot annotate: " + method + " with " + StringMan.getString(annotations)); + LOGGER.error("Cannot annotate: {} with {}", method, StringMan.getString(annotations)); return false; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicReader.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicReader.java index b4e26e1a4..53869452f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicReader.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicReader.java @@ -398,7 +398,7 @@ public class FastSchematicReader extends NBTSchematicReader { } clipboard.createEntity(loc.setPosition(loc.subtract(min.toVector3())), state); } else { - LOGGER.debug("Invalid entity: " + id); + LOGGER.error("Invalid entity: {}", id); } } } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/RollbackOptimizedHistory.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/RollbackOptimizedHistory.java index f4e0cee9a..ee2862cdf 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/RollbackOptimizedHistory.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/RollbackOptimizedHistory.java @@ -57,7 +57,7 @@ public class RollbackOptimizedHistory extends DiskStorageHistory { this.blockSize = (int) size; this.command = command; this.closed = true; - LOGGER.debug("Size: {}", size); + LOGGER.info("Size: {}", size); } public long getTime() { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/change/MutableEntityChange.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/change/MutableEntityChange.java index 82aeb8c19..16311a5a0 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/change/MutableEntityChange.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/change/MutableEntityChange.java @@ -61,7 +61,7 @@ public class MutableEntityChange implements Change { most = ((LongTag) map.get("PersistentIDMSB")).getValue(); least = ((LongTag) map.get("PersistentIDLSB")).getValue(); } else { - LOGGER.debug("Skipping entity without uuid."); + LOGGER.info("Skipping entity without uuid."); return; } List pos = (List) map.get("Pos").getValue(); @@ -76,7 +76,7 @@ public class MutableEntityChange implements Change { Map map = tag.getValue(); Tag posTag = map.get("Pos"); if (posTag == null) { - LOGGER.debug("Missing pos tag: " + tag); + LOGGER.warn("Missing pos tag: {}", tag); return; } List pos = (List) posTag.getValue(); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/changeset/AbstractChangeSet.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/changeset/AbstractChangeSet.java index aef432b19..0e9413f8a 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/changeset/AbstractChangeSet.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/history/changeset/AbstractChangeSet.java @@ -287,7 +287,7 @@ public abstract class AbstractChangeSet implements ChangeSet, IBatchProcessor { } else if (change.getClass() == EntityRemove.class) { add((EntityRemove) change); } else { - LOGGER.debug("Unknown change: " + change.getClass()); + LOGGER.error("Unknown change: {}", change.getClass()); } } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java index 1c22d8699..d6fa8f5d1 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/MainUtil.java @@ -442,7 +442,7 @@ public class MainUtil { content = scanner.next().trim(); } if (!content.startsWith("<")) { - LOGGER.debug(content); + LOGGER.info(content); } if (responseCode == 200) { return url; @@ -644,7 +644,7 @@ public class MainUtil { return newFile; } } catch (IOException e) { - LOGGER.debug("Could not save " + resource, e); + LOGGER.error("Could not save {}, {}", resource, e); } return null; } @@ -886,7 +886,7 @@ public class MainUtil { pool.submit(file::delete); Component msg = Caption.of("worldedit.schematic.delete.deleted"); if (printDebug) { - LOGGER.debug(msg.toString()); + LOGGER.info(msg.toString()); } } }); diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java index 6ada0275e..aaaa1adff 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java @@ -140,10 +140,6 @@ public class WEManager { player.printError(TextComponent.of("Missing permission " + "fawe." + manager.getKey())); } } - LOGGER.debug("Region info for " + player.getName()); - LOGGER.debug("There are " + backupRegions.size() + " backupRegions being added to Regions. Regions has " + regions.size() + " before backupRegions are added"); - regions.addAll(backupRegions); - LOGGER.debug("Finished adding regions for " + player.getName()); if (!masks.isEmpty()) { player.setMeta("lastMask", masks); } else { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java index 1c545e447..cc057728e 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java @@ -1281,7 +1281,7 @@ public class EditSession extends PassthroughExtent implements AutoCloseable { List tracingExtents = getActiveTracingExtents(); assert actor != null; if (tracingExtents.isEmpty()) { - actor.printError(TextComponent.of("worldedit.trace.no-tracing-extents")); + actor.print(TextComponent.of("worldedit.trace.no-tracing-extents")); return; } // find the common stacks diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java index 90ee83303..330b176de 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java @@ -523,7 +523,7 @@ public class RegionCommands { HeightMapFilter filter = new HeightMapFilter(new GaussianKernel(5, 1.0)); float[] changed = heightMap.applyFilter(filter, iterations); int affected = heightMap.applyChanges(changed, snowBlockCount); - actor.printInfo(Caption.of("worldedit.snowsmooth.changed", TextComponent.of(affected))); + actor.print(Caption.of("worldedit.snowsmooth.changed", TextComponent.of(affected))); return affected; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java index 20e648ed2..3c05e0668 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java @@ -432,7 +432,7 @@ public class SchematicCommands { ) throws WorldEditException { //FAWE end if (worldEdit.getPlatformManager().queryCapability(Capability.GAME_HOOKS).getDataVersion() == -1) { - actor.printError(TranslatableComponent.of("worldedit.schematic.unsupported-minecraft-version")); + actor.print(TranslatableComponent.of("worldedit.schematic.unsupported-minecraft-version")); return; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java index d06ec7cfa..8395b2e2d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java @@ -226,7 +226,7 @@ public class ToolCommands { ) @CommandPermissions("worldedit.tool.inspect") public void inspectBrush(Player player, LocalSession session) throws WorldEditException { - setTool(player, session, new InspectBrush(), "worldedit.tool.info.equip"); + setTool(player, session, new InspectBrush(), "worldedit.tool.inspect.equip"); } //FAWE end diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java index 143537cd3..9fe5922cf 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/WorldEditCommands.java @@ -197,7 +197,7 @@ public class WorldEditCommands { if (hookMode != null) { newMode = hookMode == HookMode.ACTIVE; if (newMode == previousMode) { - actor.printError(Caption.of(previousMode + actor.print(Caption.of(previousMode ? "worldedit.trace.active.already" : "worldedit.trace.inactive.already")); return; @@ -206,7 +206,7 @@ public class WorldEditCommands { newMode = !previousMode; } session.setTracingActions(newMode); - actor.printInfo(Caption.of(newMode ? "worldedit.trace.active" : "worldedit.trace.inactive")); + actor.print(Caption.of(newMode ? "worldedit.trace.active" : "worldedit.trace.inactive")); } @Command( diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/entity/Player.java b/worldedit-core/src/main/java/com/sk89q/worldedit/entity/Player.java index 6380b95bf..0ce65f2ed 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/entity/Player.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/entity/Player.java @@ -442,16 +442,16 @@ public interface Player extends Entity, Actor { getSession().setClipboard(holder); } } catch (FaweClipboardVersionMismatchException e) { - printError(Caption.of("fawe.error.clipboard.on.disk.version.mismatch")); + print(Caption.of("fawe.error.clipboard.on.disk.version.mismatch")); } catch (RuntimeException e) { - printError(Caption.of("fawe.error.clipboard.invalid")); + print(Caption.of("fawe.error.clipboard.invalid")); e.printStackTrace(); print(Caption.of("fawe.error.stacktrace")); print(Caption.of("fawe.error.clipboard.load.failure")); print(Caption.of("fawe.error.clipboard.invalid.info", file.getName(), file.length())); print(Caption.of("fawe.error.stacktrace")); } catch (Exception e) { - printError(Caption.of("fawe.error.clipboard.invalid")); + print(Caption.of("fawe.error.clipboard.invalid")); e.printStackTrace(); print(Caption.of("fawe.error.stacktrace")); print(Caption.of("fawe.error.no-failure")); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java index 8922fafe8..36fda3df1 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java @@ -755,7 +755,7 @@ public final class PlatformCommandManager { } } catch (ConditionFailedException e) { if (e.getCondition() instanceof PermissionCondition) { - actor.printError(Caption.of( + actor.print(Caption.of( "fawe.error.no-perm", StringMan.getString(((PermissionCondition) e.getCondition()).getPermissions()) )); @@ -911,7 +911,7 @@ public final class PlatformCommandManager { suggestions = commandManager.getSuggestions(access, argStrings); } catch (Throwable t) { // catch errors which are *not* command exceptions generated by parsers/suggesters if (!(t instanceof CommandException)) { - LOGGER.debug("Unexpected error occurred while generating suggestions for input: " + arguments, t); + LOGGER.error("Unexpected error occurred while generating suggestions for input: {}", arguments, t); return; } throw t; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java index 820a4f34a..a29903a6d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java @@ -213,7 +213,7 @@ public class AbstractDelegateExtent implements Extent { Extent next = ((AbstractDelegateExtent) extent).getExtent(); new ExtentTraverser(this).setNext(next); } else { - LOGGER.debug("Cannot disable queue"); + LOGGER.error("Cannot disable queue"); } } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java index de1e2afbe..debae09c3 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/SpongeSchematicReader.java @@ -122,7 +122,7 @@ public class SpongeSchematicReader extends NBTSchematicReader { } else if (dataVersion < liveDataVersion) { fixer = platform.getDataFixer(); if (fixer != null) { - LOGGER.debug("Schematic was made in an older Minecraft version ({} < {}), will attempt DFU.", + LOGGER.info("Schematic was made in an older Minecraft version ({} < {}), will attempt DFU.", dataVersion, liveDataVersion ); } else { diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/SchematicsEventListener.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/SchematicsEventListener.java index 75907138d..2eeab1287 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/SchematicsEventListener.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/SchematicsEventListener.java @@ -39,7 +39,7 @@ public class SchematicsEventListener { try { Files.createDirectories(config.resolve(event.getConfiguration().saveDir)); } catch (FileAlreadyExistsException e) { - LOGGER.debug("Schematic directory exists as file. Possible symlink.", e); + LOGGER.info("Schematic directory exists as file. Possible symlink.", e); } catch (IOException e) { LOGGER.warn("Failed to create schematics directory", e); } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/anvil/ChunkDeleter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/anvil/ChunkDeleter.java index d2cdf50c0..e4dcd99ab 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/anvil/ChunkDeleter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/anvil/ChunkDeleter.java @@ -132,7 +132,7 @@ public final class ChunkDeleter { private boolean runBatch(ChunkDeletionInfo.ChunkBatch chunkBatch) { int chunkCount = chunkBatch.getChunkCount(); - LOGGER.debug("Processing deletion batch with {} chunks.", chunkCount); + LOGGER.info("Processing deletion batch with {} chunks.", chunkCount); final Map> regionToChunkList = groupChunks(chunkBatch); BiPredicate predicate = createPredicates(chunkBatch.deletionPredicates); shouldPreload = chunkBatch.chunks == null; @@ -269,10 +269,10 @@ public final class ChunkDeleter { region.deleteChunk(chunk); totalChunksDeleted++; if (debugRate != 0 && totalChunksDeleted % debugRate == 0) { - LOGGER.debug("Deleted {} chunks so far.", totalChunksDeleted); + LOGGER.info("Deleted {} chunks so far.", totalChunksDeleted); } } else { - LOGGER.debug("Chunk did not match predicates: " + chunk); + LOGGER.warn("Chunk did not match predicates: {}", chunk); } } return true; diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockData.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockData.java index 0aafc8a2f..eb9343490 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockData.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockData.java @@ -119,7 +119,7 @@ public final class BundledBlockData { if (url == null) { throw new IOException("Could not find blocks.json"); } - LOGGER.debug("Using {} for bundled block data.", url); + LOGGER.info("Using {} for bundled block data.", url); String data = Resources.toString(url, Charset.defaultCharset()); List entries = gson.fromJson(data, new TypeToken>() { }.getType()); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledItemData.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledItemData.java index 5dd16d74a..8bc068529 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledItemData.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledItemData.java @@ -104,7 +104,7 @@ public final class BundledItemData { if (url == null) { throw new IOException("Could not find items.json"); } - LOGGER.debug("Using {} for bundled item data.", url); + LOGGER.info("Using {} for bundled item data.", url); String data = Resources.toString(url, Charset.defaultCharset()); List entries = gson.fromJson(data, new TypeToken>() { }.getType()); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java index 711d0d090..271feab78 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java @@ -149,7 +149,8 @@ public final class LegacyMapper { // if it's still null, both fixer and default failed if (state == null) { - LOGGER.debug("Unknown block: " + value); + LOGGER.error("Unknown block: {}. Neither the DataFixer nor defaulting worked to recognize this block.", + value); } else { // it's not null so one of them succeeded, now use it blockToStringMap.put(state, id); @@ -185,7 +186,7 @@ public final class LegacyMapper { type = ItemTypes.get(value); } if (type == null) { - LOGGER.debug("Unknown item: " + value); + LOGGER.error("Unknown item: {}. Neither the DataFixer nor defaulting worked to recognize this item.", value); } else { try { itemMap.put(getCombinedId(id), type);