From 23d2640176ff3639657529f0c430c00c6f2ab548 Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Mon, 31 Jul 2023 17:41:41 +0000 Subject: [PATCH] Add logging in reply --- BedrockServer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BedrockServer.cpp b/BedrockServer.cpp index e9e8da38f..314444a89 100644 --- a/BedrockServer.cpp +++ b/BedrockServer.cpp @@ -1504,6 +1504,7 @@ void BedrockServer::_reply(unique_ptr& command) { const string& pluginName = command->request["plugin"]; if (command->socket) { + SINFO("[performance] Command " << command->response.methodLine << " has a socket, going to try to reply."); if (!pluginName.empty()) { // Let the plugin handle it SINFO("Plugin '" << pluginName << "' handling response '" << command->response.methodLine @@ -1516,13 +1517,13 @@ void BedrockServer::_reply(unique_ptr& command) { } } else { // Otherwise we send the standard response. - SDEBUG("About to reply to command " << command->request.methodLine); + SINFO("[performance] About to reply to command " << command->request.methodLine); if (!command->socket->send(command->response.serialize())) { // If we can't send (client closed the socket?), alert our plugin it's response was never sent. SINFO("No socket to reply for: '" << command->request.methodLine << "' #" << command->initiatingClientID); command->handleFailedReply(); } else { - SDEBUG("Replied"); + SINFO("[performance] Replied"); } } @@ -1538,6 +1539,7 @@ void BedrockServer::_reply(unique_ptr& command) { } command->handleFailedReply(); } + SINFO("[performance] Finished replying to command " << command->request.methodLine << " moving on to the next command."); }