Remove misleading tag/line in messages (#6495)

This commit is contained in:
Clyde Stubbs 2024-04-08 14:13:12 +10:00 committed by GitHub
parent 38233444e7
commit 97ff87b718
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,7 @@ void Component::call_setup() { this->setup(); }
void Component::call_dump_config() { void Component::call_dump_config() {
this->dump_config(); this->dump_config();
if (this->is_failed()) { if (this->is_failed()) {
ESP_LOGE(this->get_component_source(), " Component is marked FAILED"); ESP_LOGE(TAG, " Component %s is marked FAILED", this->get_component_source());
} }
} }
@ -154,26 +154,26 @@ void Component::status_set_warning(const char *message) {
return; return;
this->component_state_ |= STATUS_LED_WARNING; this->component_state_ |= STATUS_LED_WARNING;
App.app_state_ |= STATUS_LED_WARNING; App.app_state_ |= STATUS_LED_WARNING;
ESP_LOGW(this->get_component_source(), "Warning set: %s", message); ESP_LOGW(TAG, "Component %s set Warning flag: %s", this->get_component_source(), message);
} }
void Component::status_set_error(const char *message) { void Component::status_set_error(const char *message) {
if ((this->component_state_ & STATUS_LED_ERROR) != 0) if ((this->component_state_ & STATUS_LED_ERROR) != 0)
return; return;
this->component_state_ |= STATUS_LED_ERROR; this->component_state_ |= STATUS_LED_ERROR;
App.app_state_ |= STATUS_LED_ERROR; App.app_state_ |= STATUS_LED_ERROR;
ESP_LOGE(this->get_component_source(), "Error set: %s", message); ESP_LOGE(TAG, "Component %s set Error flag: %s", this->get_component_source(), message);
} }
void Component::status_clear_warning() { void Component::status_clear_warning() {
if ((this->component_state_ & STATUS_LED_WARNING) == 0) if ((this->component_state_ & STATUS_LED_WARNING) == 0)
return; return;
this->component_state_ &= ~STATUS_LED_WARNING; this->component_state_ &= ~STATUS_LED_WARNING;
ESP_LOGW(this->get_component_source(), "Warning cleared"); ESP_LOGW(TAG, "Component %s cleared Warning flag", this->get_component_source());
} }
void Component::status_clear_error() { void Component::status_clear_error() {
if ((this->component_state_ & STATUS_LED_ERROR) == 0) if ((this->component_state_ & STATUS_LED_ERROR) == 0)
return; return;
this->component_state_ &= ~STATUS_LED_ERROR; this->component_state_ &= ~STATUS_LED_ERROR;
ESP_LOGE(this->get_component_source(), "Error cleared"); ESP_LOGE(TAG, "Component %s cleared Error flag", this->get_component_source());
} }
void Component::status_momentary_warning(const std::string &name, uint32_t length) { void Component::status_momentary_warning(const std::string &name, uint32_t length) {
this->status_set_warning(); this->status_set_warning();