From 0379de244457fc42a09920a4c9eadb0585a96181 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 21:58:46 +0000 Subject: [PATCH] Refactor: replace string concatenation with parameterized logging Replaced manual string concatenation in LOGGER.error calls with SLF4J parameterized logging using '{}' placeholders in ServerCommandExecutor.java. This improves performance by avoiding string construction when the log level is disabled and follows best practices for the SLF4J logging framework. Co-authored-by: cuspymd <8870299+cuspymd@users.noreply.github.com> --- .../cuspymd/mcp/mod/server/tools/ServerCommandExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cuspymd/mcp/mod/server/tools/ServerCommandExecutor.java b/src/main/java/cuspymd/mcp/mod/server/tools/ServerCommandExecutor.java index 5188a51..116b5ea 100644 --- a/src/main/java/cuspymd/mcp/mod/server/tools/ServerCommandExecutor.java +++ b/src/main/java/cuspymd/mcp/mod/server/tools/ServerCommandExecutor.java @@ -159,7 +159,7 @@ public boolean shouldBroadcastConsoleToOps() { resultObj.addProperty("summary", "Command failed to execute. Feedback: " + (msgs.size() > 0 ? msgs.get(0).getAsString() : "")); } } catch (Exception e) { - LOGGER.error("Error executing server command: " + command, e); + LOGGER.error("Error executing server command: {}", command, e); failedCount++; resultObj.addProperty("status", "error"); resultObj.addProperty("accepted", false);