From f57f903207c1cbdc582fbc2a11301f18af7e08ba Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 30 Dec 2022 12:57:54 -0800 Subject: [PATCH] fix ep3 command debug log in terminal --- src/Episode3/Server.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Episode3/Server.cc b/src/Episode3/Server.cc index 3cb8dda6..b256ef76 100644 --- a/src/Episode3/Server.cc +++ b/src/Episode3/Server.cc @@ -264,7 +264,6 @@ void Server::send_debug_message_printf(const char* fmt, ...) const { va_start(va, fmt); std::string buf = string_vprintf(fmt, va); va_end(va); - this->base()->log.info("%s", buf.c_str()); std::u16string decoded = decode_sjis(buf); send_text_message(l, decoded.c_str()); } @@ -278,7 +277,6 @@ void Server::send_info_message_printf(const char* fmt, ...) const { va_start(va, fmt); std::string buf = string_vprintf(fmt, va); va_end(va); - this->base()->log.info("%s", buf.c_str()); std::u16string decoded = decode_sjis(buf); send_text_message(l, decoded.c_str()); } @@ -286,10 +284,12 @@ void Server::send_info_message_printf(const char* fmt, ...) const { void Server::send_debug_command_received_message( uint8_t client_id, uint8_t subsubcommand, const char* description) const { + this->log_debug("%hhu/CAx%02hhX %s", client_id, subsubcommand, description); this->send_debug_message_printf("$C5%hhu/CAx%02hhX %s", client_id, subsubcommand, description); } void Server::send_debug_command_received_message(uint8_t subsubcommand, const char* description) const { + this->log_debug("*/CAx%02hhX %s", subsubcommand, description); this->send_debug_message_printf("$C5*/CAx%02hhX %s", subsubcommand, description); }