mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 23:37:34 +00:00
Skip proto message dump for log and camera responses
In debug builds (HAS_PROTO_MESSAGE_DUMP), skip dump logging for SubscribeLogsResponse (recursive logging risk) and CameraImageResponse (high-frequency image data noise). This matches the base branch behavior where both bypassed dump logging via direct send_message_impl() calls.
This commit is contained in:
@@ -1869,7 +1869,12 @@ bool APIConnection::try_to_clear_buffer(bool log_out_of_space) {
|
||||
bool APIConnection::send_message_(uint32_t payload_size, uint8_t message_type, MessageEncodeFn encode_fn,
|
||||
const void *msg) {
|
||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||
{
|
||||
// Skip dump for log messages (recursive logging risk) and camera frames (high-frequency noise)
|
||||
if (message_type != SubscribeLogsResponse::MESSAGE_TYPE
|
||||
#ifdef USE_CAMERA
|
||||
&& message_type != CameraImageResponse::MESSAGE_TYPE
|
||||
#endif
|
||||
) {
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user