From 8ece639987339a7082fdcea68a4d766906e786d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Tue, 16 Nov 2021 11:28:12 +0100 Subject: [PATCH] Change log level from DEBUG to INFO for sniffing services (#2736) Sniffing for codes only happens if the user deliberately asked for it with the related service through HA - to find out the codes present in the air. The resulted data shouldn't be printed out only in debug mode, as this is information required to be known on demand for later use, not actually a debug info. Changing log level from DEBUG to INFO for sniffing services has two benefits: - no need to run firmware with DEBUG enabled for occasional sniffing with devices in production (no need to flash back and forth with different log levels set just for this reason) - if the user still wants DEBUG enabled, sniffed data appears in different color, it's easier to find between the lines. --- esphome/components/rf_bridge/rf_bridge.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/esphome/components/rf_bridge/rf_bridge.cpp b/esphome/components/rf_bridge/rf_bridge.cpp index a4259e5aa2..d8c8047496 100644 --- a/esphome/components/rf_bridge/rf_bridge.cpp +++ b/esphome/components/rf_bridge/rf_bridge.cpp @@ -52,7 +52,7 @@ bool RFBridgeComponent::parse_bridge_byte_(uint8_t byte) { if (action == RF_CODE_LEARN_OK) ESP_LOGD(TAG, "Learning success"); - ESP_LOGD(TAG, "Received RFBridge Code: sync=0x%04X low=0x%04X high=0x%04X code=0x%06X", data.sync, data.low, + ESP_LOGI(TAG, "Received RFBridge Code: sync=0x%04X low=0x%04X high=0x%04X code=0x%06X", data.sync, data.low, data.high, data.code); this->data_callback_.call(data); break; @@ -73,7 +73,7 @@ bool RFBridgeComponent::parse_bridge_byte_(uint8_t byte) { data.code += next_byte; } - ESP_LOGD(TAG, "Received RFBridge Advanced Code: length=0x%02X protocol=0x%02X code=0x%s", data.length, + ESP_LOGI(TAG, "Received RFBridge Advanced Code: length=0x%02X protocol=0x%02X code=0x%s", data.length, data.protocol, data.code.c_str()); this->advanced_data_callback_.call(data); break; @@ -97,7 +97,7 @@ bool RFBridgeComponent::parse_bridge_byte_(uint8_t byte) { str += " "; } } - ESP_LOGD(TAG, "Received RFBridge Bucket: %s", str.c_str()); + ESP_LOGI(TAG, "Received RFBridge Bucket: %s", str.c_str()); break; } default: @@ -186,7 +186,7 @@ void RFBridgeComponent::dump_config() { } void RFBridgeComponent::start_advanced_sniffing() { - ESP_LOGD(TAG, "Advanced Sniffing on"); + ESP_LOGI(TAG, "Advanced Sniffing on"); this->write(RF_CODE_START); this->write(RF_CODE_SNIFFING_ON); this->write(RF_CODE_STOP); @@ -194,7 +194,7 @@ void RFBridgeComponent::start_advanced_sniffing() { } void RFBridgeComponent::stop_advanced_sniffing() { - ESP_LOGD(TAG, "Advanced Sniffing off"); + ESP_LOGI(TAG, "Advanced Sniffing off"); this->write(RF_CODE_START); this->write(RF_CODE_SNIFFING_OFF); this->write(RF_CODE_STOP); @@ -202,7 +202,7 @@ void RFBridgeComponent::stop_advanced_sniffing() { } void RFBridgeComponent::start_bucket_sniffing() { - ESP_LOGD(TAG, "Raw Bucket Sniffing on"); + ESP_LOGI(TAG, "Raw Bucket Sniffing on"); this->write(RF_CODE_START); this->write(RF_CODE_RFIN_BUCKET); this->write(RF_CODE_STOP);