From 352101e657024e3560912f0c90cdb57f6dff76f4 Mon Sep 17 00:00:00 2001 From: faumaray Date: Fri, 26 Jun 2026 02:39:10 +0300 Subject: [PATCH] Core: log reply attempts and surface send failures Log every command reply (target + size, debug) and warn when the plugin's sendTextMessage returns an error instead of silently discarding it. Co-Authored-By: Claude Opus 4.8 --- src/Core.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Core.cpp b/src/Core.cpp index bfc0bbb..c7e5109 100644 --- a/src/Core.cpp +++ b/src/Core.cpp @@ -1246,9 +1246,23 @@ namespace Echoion::Core // Create reply callback auto replyFunc = [this](uint64_t clientId, std::string_view message) { + Void::Log::debug( + "Core", "{}", + std::format("Reply -> client {} ({} bytes)", + clientId, message.size())); if (pluginInterface_) { - pluginInterface_->sendTextMessage( + auto sent = pluginInterface_->sendTextMessage( clientId, std::string(message)); + if (!sent) { + Void::Log::warn( + "Core", "{}", + std::format("Reply send failed: {}", + sent.error().message)); + } + } else { + Void::Log::warn("Core", "{}", + "Reply dropped: no plugin " + "interface"); } };