mirror of
https://github.com/esphome/esphome.git
synced 2026-01-09 11:40:50 -07:00
[mqtt] Combine log statements to reduce loop blocking (#12938)
This commit is contained in:
@@ -154,15 +154,17 @@ void MQTTClientComponent::on_log(uint8_t level, const char *tag, const char *mes
|
||||
|
||||
void MQTTClientComponent::dump_config() {
|
||||
char ip_buf[network::IP_ADDRESS_BUFFER_SIZE];
|
||||
// clang-format off
|
||||
ESP_LOGCONFIG(TAG,
|
||||
"MQTT:\n"
|
||||
" Server Address: %s:%u (%s)\n"
|
||||
" Username: " LOG_SECRET("'%s'") "\n"
|
||||
" Client ID: " LOG_SECRET("'%s'") "\n"
|
||||
" Clean Session: %s",
|
||||
" Client ID: " LOG_SECRET("'%s'") "\n"
|
||||
" Clean Session: %s",
|
||||
this->credentials_.address.c_str(), this->credentials_.port, this->ip_.str_to(ip_buf),
|
||||
this->credentials_.username.c_str(), this->credentials_.client_id.c_str(),
|
||||
YESNO(this->credentials_.clean_session));
|
||||
// clang-format on
|
||||
if (this->is_discovery_ip_enabled()) {
|
||||
ESP_LOGCONFIG(TAG, " Discovery IP enabled");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user