forked from External/mage
* Removed the LogServices (H2 DB file that logs actions).
This commit is contained in:
parent
6598e6cc7f
commit
e1ca3b5cc5
5 changed files with 0 additions and 58 deletions
|
|
@ -68,9 +68,7 @@ import mage.server.game.GamesRoom;
|
|||
import mage.server.game.GamesRoomManager;
|
||||
import mage.server.game.PlayerFactory;
|
||||
import mage.server.game.ReplayManager;
|
||||
import mage.server.services.LogKeys;
|
||||
import mage.server.services.impl.FeedbackServiceImpl;
|
||||
import mage.server.services.impl.LogServiceImpl;
|
||||
import mage.server.tournament.TournamentFactory;
|
||||
import mage.server.tournament.TournamentManager;
|
||||
import mage.server.util.ConfigSettings;
|
||||
|
|
@ -188,7 +186,6 @@ public class MageServerImpl implements MageServer {
|
|||
public boolean registerClient(String userName, String sessionId, MageVersion version) throws MageException {
|
||||
// This method is deprecated, so just inform the server version.
|
||||
logger.info("MageVersionException: userName=" + userName + ", version=" + version);
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_WRONG_VERSION, userName, version.toString(), Main.getVersion().toString(), sessionId);
|
||||
throw new MageVersionException(version, Main.getVersion());
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +194,6 @@ public class MageServerImpl implements MageServer {
|
|||
try {
|
||||
if (version.compareTo(Main.getVersion()) != 0) {
|
||||
logger.info("MageVersionException: userName=" + userName + ", version=" + version);
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_WRONG_VERSION, userName, version.toString(), Main.getVersion().toString(), sessionId);
|
||||
throw new MageVersionException(version, Main.getVersion());
|
||||
}
|
||||
return SessionManager.getInstance().connectUser(sessionId, userName, password);
|
||||
|
|
@ -266,7 +262,6 @@ public class MageServerImpl implements MageServer {
|
|||
logger.debug("- " + user.getName() + " userId: " + user.getId());
|
||||
logger.debug("- chatId: " + TableManager.getInstance().getChatId(table.getTableId()));
|
||||
}
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_TABLE_CREATED, sessionId, userId.toString(), table.getTableId().toString());
|
||||
return table;
|
||||
}
|
||||
});
|
||||
|
|
@ -315,7 +310,6 @@ public class MageServerImpl implements MageServer {
|
|||
}
|
||||
TableView table = GamesRoomManager.getInstance().getRoom(roomId).createTournamentTable(userId, options);
|
||||
logger.debug("Tournament table " + table.getTableId() + " created");
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_TOURNAMENT_TABLE_CREATED, sessionId, userId.toString(), table.getTableId().toString());
|
||||
return table;
|
||||
} catch (Exception ex) {
|
||||
handleException(ex);
|
||||
|
|
@ -1190,7 +1184,6 @@ public class MageServerImpl implements MageServer {
|
|||
public void execute() {
|
||||
String host = SessionManager.getInstance().getSession(sessionId).getHost();
|
||||
FeedbackServiceImpl.instance.feedback(username, title, type, message, email, host);
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_FEEDBACK_ADDED, sessionId, username, host);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1226,7 +1219,6 @@ public class MageServerImpl implements MageServer {
|
|||
protected void execute(final String actionName, final String sessionId, final Action action, boolean checkAdminRights) throws MageException {
|
||||
if (checkAdminRights) {
|
||||
if (!SessionManager.getInstance().isAdmin(sessionId)) {
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_NOT_ADMIN, actionName, sessionId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -1246,8 +1238,6 @@ public class MageServerImpl implements MageServer {
|
|||
} catch (MageException me) {
|
||||
throw new RuntimeException(me);
|
||||
}
|
||||
} else {
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_NOT_VALID_SESSION_INTERNAL, actionName, sessionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1255,15 +1245,12 @@ public class MageServerImpl implements MageServer {
|
|||
} catch (Exception ex) {
|
||||
handleException(ex);
|
||||
}
|
||||
} else {
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_NOT_VALID_SESSION, actionName, sessionId);
|
||||
}
|
||||
}
|
||||
|
||||
protected <T> T executeWithResult(String actionName, final String sessionId, final ActionWithResult<T> action, boolean checkAdminRights) throws MageException {
|
||||
if (checkAdminRights) {
|
||||
if (!SessionManager.getInstance().isAdmin(sessionId)) {
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_NOT_ADMIN, actionName, sessionId);
|
||||
return action.negativeResult();
|
||||
}
|
||||
}
|
||||
|
|
@ -1278,8 +1265,6 @@ public class MageServerImpl implements MageServer {
|
|||
} catch (Exception ex) {
|
||||
handleException(ex);
|
||||
}
|
||||
} else {
|
||||
LogServiceImpl.instance.log(LogKeys.KEY_NOT_VALID_SESSION, actionName, sessionId);
|
||||
}
|
||||
return action.negativeResult();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue