mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
server: improved fix command logs
This commit is contained in:
parent
78b46d622f
commit
6d392bcdcf
1 changed files with 8 additions and 8 deletions
|
|
@ -1296,13 +1296,13 @@ public class GameController implements GameCallback {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.warn("FIX command was called by " + user.getName() + " for game " + game.getId() + " - players: " +
|
String playersInfo = game.getPlayerList().stream()
|
||||||
game.getPlayerList().stream()
|
.map(game::getPlayer)
|
||||||
.map(game::getPlayer)
|
.filter(Objects::nonNull)
|
||||||
.filter(Objects::nonNull)
|
.map(p -> p.getName() + (p.isInGame() ? " (play)" : " (out)"))
|
||||||
.map(p -> p.getName() + (p.isInGame() ? " (play)" : " (out)"))
|
.collect(Collectors.joining(", "));
|
||||||
.collect(Collectors.joining(", ")));
|
logger.warn("FIX command was called for game " + game.getId() + " by " + user.getName()
|
||||||
|
+ "; players: " + playersInfo + "; " + game);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("<font color='red'>FIX command called by ").append(user.getName()).append("</font>");
|
sb.append("<font color='red'>FIX command called by ").append(user.getName()).append("</font>");
|
||||||
sb.append("<font size='-2'>"); // font resize start for all next logs
|
sb.append("<font size='-2'>"); // font resize start for all next logs
|
||||||
|
|
@ -1361,7 +1361,7 @@ public class GameController implements GameCallback {
|
||||||
sb.append("</font>"); // font resize end
|
sb.append("</font>"); // font resize end
|
||||||
sb.append("<br>");
|
sb.append("<br>");
|
||||||
|
|
||||||
logger.warn("FIX command result for game " + game.getId() + ": " + appliedFixes);
|
logger.warn("FIX command result: " + appliedFixes);
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue