diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/response/admin/ExecCommandResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/response/admin/ExecCommandResponse.java index e47be8ba..be4114e5 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/response/admin/ExecCommandResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/response/admin/ExecCommandResponse.java @@ -22,15 +22,15 @@ public void reply() throws Exception { requestError("Access denied"); writeNoError(output); String cmd = input.readString(SerializeLimits.MAX_COMMAND); - LogHelper.Output loutput = message -> { + LogHelper.OutputEnity loutput = new LogHelper.OutputEnity(message -> { try { output.writeBoolean(true); output.writeString(message, SerializeLimits.MAX_COMMAND); } catch (IOException e) { LogHelper.error(e); } - }; - LogHelper.addOutput(loutput, LogHelper.OutputTypes.PLAIN); + }, LogHelper.OutputTypes.PLAIN); + LogHelper.addOutput(loutput); try { server.commandHandler.eval(cmd, false); output.writeBoolean(false); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/Client.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/Client.java index 74deb416..81ca8be4 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/Client.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/Client.java @@ -14,7 +14,7 @@ public class Client { public boolean checkSign; public ClientPermissions permissions; public String username; - public LogHelper.Output logOutput; + public LogHelper.OutputEnity logOutput; public Client(long session) { this.session = session; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/admin/AddLogListenerResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/admin/AddLogListenerResponse.java index f507a7e8..f2ad8c38 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/admin/AddLogListenerResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/admin/AddLogListenerResponse.java @@ -43,8 +43,8 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client LogHelper.info("Client %s remove log listener", client.username); } }; - client.logOutput = output; - LogHelper.addOutput(output, outputType); + client.logOutput = new LogHelper.OutputEnity(output,outputType); + LogHelper.addOutput(client.logOutput); } } }