From a4afdb8d3f8d96933df2d4563ce81f8545d15414 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 18 Apr 2017 23:35:45 +0200 Subject: [PATCH] Removed some not needed error log messages. --- .../src/main/java/mage/server/UserManager.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Mage.Server/src/main/java/mage/server/UserManager.java b/Mage.Server/src/main/java/mage/server/UserManager.java index 0aaab44e74..f33b3fe054 100644 --- a/Mage.Server/src/main/java/mage/server/UserManager.java +++ b/Mage.Server/src/main/java/mage/server/UserManager.java @@ -27,15 +27,14 @@ */ package mage.server; +import java.util.*; +import java.util.concurrent.*; import mage.server.User.UserState; import mage.server.record.UserStats; import mage.server.record.UserStatsRepository; import mage.server.util.ThreadExecutor; import org.apache.log4j.Logger; -import java.util.*; -import java.util.concurrent.*; - /** * manages users - if a user is disconnected and 10 minutes have passed with no * activity the user is removed @@ -68,8 +67,7 @@ public enum UserManager { public Optional getUser(UUID userId) { if (!users.containsKey(userId)) { - LOGGER.error(String.format("User with id %s could not be found", userId)); - + LOGGER.trace(String.format("User with id %s could not be found", userId)); return Optional.empty(); } else { return Optional.of(users.get(userId)); @@ -82,10 +80,7 @@ public enum UserManager { if (u.isPresent()) { return u; } else { - - LOGGER.error("User with name " + userName + " could not be found"); return Optional.empty(); - } } @@ -123,8 +118,8 @@ public enum UserManager { public void removeUser(final UUID userId, final DisconnectReason reason) { if (userId != null) { - getUser(userId).ifPresent(user -> - USER_EXECUTOR.execute( + getUser(userId).ifPresent(user + -> USER_EXECUTOR.execute( () -> { try { LOGGER.info("USER REMOVE - " + user.getName() + " (" + reason.toString() + ") userId: " + userId + " [" + user.getGameInfo() + ']');