diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ClientsCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ClientsCommand.java index b038aba5..80ed2ef3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ClientsCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ClientsCommand.java @@ -31,9 +31,9 @@ public void invoke(String... args) { Client client = frameHandler.getClient(); String ip = IOHelper.getIP(channel.remoteAddress()); if (!client.isAuth) - LogHelper.info("Channel %s | checkSign %s", ip, client.checkSign ? "true" : "false"); + LogHelper.info("Channel %s | connectUUID %s | checkSign %s", ip, frameHandler.getConnectUUID(), client.checkSign ? "true" : "false"); else { - LogHelper.info("Client name %s | ip %s", client.username == null ? "null" : client.username, ip); + LogHelper.info("Client name %s | ip %s | connectUUID %s", client.username == null ? "null" : client.username, ip, frameHandler.getConnectUUID()); LogHelper.subInfo("Data: checkSign %s | isSecure %s | auth_id %s", client.checkSign ? "true" : "false", client.isSecure ? "true" : "false", client.auth_id); LogHelper.subInfo("Permissions: %s (long %d)", client.permissions == null ? "null" : client.permissions.toString(), client.permissions == null ? 0 : client.permissions.toLong()); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java index cb884138..be6f08df 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java @@ -11,6 +11,7 @@ import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; +import java.util.UUID; import java.util.concurrent.TimeUnit; public class WebSocketFrameHandler extends SimpleChannelInboundHandler { @@ -25,6 +26,7 @@ public WebSocketFrameHandler(NettyConnectContext context, LaunchServer srv, WebS } private Client client; + private final UUID connectUUID = UUID.randomUUID(); static { } @@ -37,6 +39,10 @@ public Client getClient() { return client; } + public final UUID getConnectUUID() { + return connectUUID; + } + @Override public void channelActive(ChannelHandlerContext ctx) { if (LogHelper.isDevEnabled()) {