fix bloat

This commit is contained in:
J. Nick Koston
2026-04-03 23:20:05 -10:00
parent 5553962eae
commit a3febe4a9e
3 changed files with 3 additions and 8 deletions
+3 -1
View File
@@ -409,7 +409,9 @@ class APIConnection final : public APIServerConnectionBase {
uint32_t remaining_size) {
#ifdef HAS_PROTO_MESSAGE_DUMP
if (conn->flags_.log_only_mode) {
conn->log_send_message_(msg);
auto *proto_msg = static_cast<const ProtoMessage *>(msg);
DumpBuffer dump_buf;
conn->log_send_message_(proto_msg->message_name(), proto_msg->dump_to(dump_buf));
return 1;
}
#endif
@@ -12,11 +12,6 @@ static const char *const TAG = "api.service";
void APIServerConnectionBase::log_send_message_(const LogString *name, const char *dump) {
ESP_LOGVV(TAG, "send_message %s: %s", LOG_STR_ARG(name), dump);
}
void APIServerConnectionBase::log_send_message_(const void *msg) {
auto *proto_msg = static_cast<const ProtoMessage *>(msg);
DumpBuffer dump_buf;
this->log_send_message_(proto_msg->message_name(), proto_msg->dump_to(dump_buf));
}
void APIServerConnectionBase::log_receive_message_(const LogString *name, const ProtoMessage &msg) {
DumpBuffer dump_buf;
ESP_LOGVV(TAG, "%s: %s", LOG_STR_ARG(name), msg.dump_to(dump_buf));
-2
View File
@@ -13,8 +13,6 @@ class APIServerConnectionBase {
#ifdef HAS_PROTO_MESSAGE_DUMP
protected:
void log_send_message_(const LogString *name, const char *dump);
// Log a message being sent from a void pointer (for use in encode_to_buffer paths)
void log_send_message_(const void *msg);
void log_receive_message_(const LogString *name, const ProtoMessage &msg);
void log_receive_message_(const LogString *name);