From 837bbd69ac6bfb963b88383b9bc406f443bfd113 Mon Sep 17 00:00:00 2001 From: games647 Date: Tue, 28 Jun 2016 16:09:32 +0200 Subject: [PATCH] Remove the debug code as the source for random-logouts is found --- src/main/java/fr/xephi/authme/ConsoleLogger.java | 14 -------------- .../fr/xephi/authme/cache/auth/PlayerCache.java | 4 ---- .../xephi/authme/datasource/CacheDataSource.java | 1 - 3 files changed, 19 deletions(-) diff --git a/src/main/java/fr/xephi/authme/ConsoleLogger.java b/src/main/java/fr/xephi/authme/ConsoleLogger.java index 284a74421..130919aa6 100644 --- a/src/main/java/fr/xephi/authme/ConsoleLogger.java +++ b/src/main/java/fr/xephi/authme/ConsoleLogger.java @@ -11,7 +11,6 @@ import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.logging.Level; import java.util.logging.Logger; /** @@ -67,19 +66,6 @@ public final class ConsoleLogger { } - public static void debug(String message) { - if (enableDebug) { - //creating and filling an exception is a expensive call - //TODO #419 20160601: ->so it should be removed as soon #419 is fixed - //logger.isLoggable does not work because the plugin logger is always ALL - logger.log(Level.FINE, message + ' ' + Thread.currentThread().getName(), new Exception()); - - if (useLogging) { - writeLog("Debug: " + Thread.currentThread().getName() + ':' + message); - } - } - } - /** * Print an error message. * diff --git a/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java b/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java index 9914ee3fa..600405754 100644 --- a/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java +++ b/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java @@ -1,6 +1,5 @@ package fr.xephi.authme.cache.auth; -import fr.xephi.authme.ConsoleLogger; import java.util.concurrent.ConcurrentHashMap; @@ -34,7 +33,6 @@ public class PlayerCache { * @param auth PlayerAuth */ public void addPlayer(PlayerAuth auth) { - ConsoleLogger.debug("ADDED PLAYER TO CACHE " + auth.getNickname()); cache.put(auth.getNickname().toLowerCase(), auth); } @@ -44,7 +42,6 @@ public class PlayerCache { * @param auth PlayerAuth */ public void updatePlayer(PlayerAuth auth) { - ConsoleLogger.debug("UPDATE PLAYER " + auth.getNickname()); cache.put(auth.getNickname(), auth); } @@ -54,7 +51,6 @@ public class PlayerCache { * @param user String */ public void removePlayer(String user) { - ConsoleLogger.debug("REMOVE PLAYER " + user); cache.remove(user.toLowerCase()); } diff --git a/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java b/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java index 473633e4c..79cc6ae6e 100644 --- a/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java +++ b/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java @@ -54,7 +54,6 @@ public class CacheDataSource implements DataSource { return executorService.submit(new Callable>() { @Override public Optional call() { - ConsoleLogger.debug("REFRESH " + key); return load(key); } });