mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
Removed some not needed error log messages.
This commit is contained in:
parent
cf90bb4d36
commit
a4afdb8d3f
1 changed files with 5 additions and 10 deletions
|
@ -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<User> 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() + ']');
|
||||
|
|
Loading…
Reference in a new issue