From 86e6a51d690eb1d7357eb3c2a9b291647faa02c4 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sat, 12 Aug 2017 16:08:24 +0300 Subject: [PATCH 1/2] Remove useless debug messages Config bump to 3.6.3 --- .../Maven__com_djrapitops_abstract_plugin_framework_2_0_3.xml | 2 +- Plan/pom.xml | 2 +- .../java/com/djrapitops/plan/data/cache/DataCacheHandler.java | 1 - .../plan/data/cache/queue/DataCacheProcessQueue.java | 1 - .../java/com/djrapitops/plan/database/databases/SQLDB.java | 2 ++ .../com/djrapitops/plan/database/tables/SessionsTable.java | 4 +--- Plan/src/main/resources/plugin.yml | 2 +- 7 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Plan/.idea/libraries/Maven__com_djrapitops_abstract_plugin_framework_2_0_3.xml b/Plan/.idea/libraries/Maven__com_djrapitops_abstract_plugin_framework_2_0_3.xml index e45a58e08..bbaec2a3a 100644 --- a/Plan/.idea/libraries/Maven__com_djrapitops_abstract_plugin_framework_2_0_3.xml +++ b/Plan/.idea/libraries/Maven__com_djrapitops_abstract_plugin_framework_2_0_3.xml @@ -1,7 +1,7 @@ - + diff --git a/Plan/pom.xml b/Plan/pom.xml index 0ca473df0..1595f4805 100644 --- a/Plan/pom.xml +++ b/Plan/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.djrapitops Plan - 3.6.2 + 3.6.3 jar diff --git a/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java b/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java index 25fbb76e1..a6d34a9cf 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java @@ -312,7 +312,6 @@ public class DataCacheHandler extends SessionCache { * @param uuid Player's UUID */ public void saveCachedData(UUID uuid) { - Log.debug(uuid + ": SaveCachedData"); DBCallableProcessor saveProcessor = data -> { data.access(); data.setClearAfterSave(true); diff --git a/Plan/src/main/java/com/djrapitops/plan/data/cache/queue/DataCacheProcessQueue.java b/Plan/src/main/java/com/djrapitops/plan/data/cache/queue/DataCacheProcessQueue.java index ce7fffce3..1a6116c54 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/cache/queue/DataCacheProcessQueue.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/cache/queue/DataCacheProcessQueue.java @@ -88,7 +88,6 @@ class ProcessConsumer extends Consumer { return; } - Log.debug(info.getUuid() + ": Processing type: " + info.getType().name()); DBCallableProcessor p = data -> { if (!info.process(data)) { Log.error("Attempted to process data for wrong uuid: W:" + data.getUuid() + " | R:" + info.getUuid() + " Type:" + info.getType().name()); diff --git a/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java b/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java index ec216ee91..9e9d15f41 100644 --- a/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java +++ b/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java @@ -538,6 +538,7 @@ public abstract class SQLDB extends Database { return; } Log.debug("Database", "Save userdata: " + uuid); + Benchmark.start("Save Single UserData"); checkConnection(); data.access(); usersTable.saveUserDataInformation(data); @@ -551,6 +552,7 @@ public abstract class SQLDB extends Database { worldTimesTable.saveWorldTimes(userId, data.getWorldTimes().getTimes()); data.stopAccessing(); commit(); + Benchmark.stop("Database", "Save Single UserData"); setAvailable(); } diff --git a/Plan/src/main/java/com/djrapitops/plan/database/tables/SessionsTable.java b/Plan/src/main/java/com/djrapitops/plan/database/tables/SessionsTable.java index 216613c9c..5f1f5a672 100644 --- a/Plan/src/main/java/com/djrapitops/plan/database/tables/SessionsTable.java +++ b/Plan/src/main/java/com/djrapitops/plan/database/tables/SessionsTable.java @@ -112,7 +112,7 @@ public class SessionsTable extends Table { return; } - Benchmark.start("Save Sessions"); + PreparedStatement statement = null; try { statement = prepareStatement("INSERT INTO " + tableName + " (" @@ -120,7 +120,6 @@ public class SessionsTable extends Table { + columnSessionStart + ", " + columnSessionEnd + ") VALUES (?, ?, ?)"); - for (SessionData session : sessions) { long end = session.getSessionEnd(); long start = session.getSessionStart(); @@ -137,7 +136,6 @@ public class SessionsTable extends Table { statement.executeBatch(); } finally { close(statement); - Benchmark.stop("Database", "Save Sessions"); } } diff --git a/Plan/src/main/resources/plugin.yml b/Plan/src/main/resources/plugin.yml index 3e0993c53..dd2f27d67 100644 --- a/Plan/src/main/resources/plugin.yml +++ b/Plan/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: Plan author: Rsl1122 main: main.java.com.djrapitops.plan.Plan -version: 3.6.2 +version: 3.6.3 softdepend: - OnTime - EssentialsX From 450f777de8c84b74d826cbe21ac7af6f3bea6c58 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sat, 12 Aug 2017 16:17:53 +0300 Subject: [PATCH 2/2] Debug on disable. --- Plan/src/main/java/com/djrapitops/plan/Plan.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Plan/src/main/java/com/djrapitops/plan/Plan.java b/Plan/src/main/java/com/djrapitops/plan/Plan.java index f04272aac..533d35d0d 100644 --- a/Plan/src/main/java/com/djrapitops/plan/Plan.java +++ b/Plan/src/main/java/com/djrapitops/plan/Plan.java @@ -259,6 +259,7 @@ public class Plan extends BukkitPlugin { scheduler.shutdown(); // Schedules the save to shutdown after it has ran the execute method. } + getPluginLogger().endAllDebugs(); Log.info(Locale.get(Msg.DISABLED).toString()); Locale.unload(); }