Optimize API component LOGCONFIG usage for flash memory savings (#9526)

This commit is contained in:
J. Nick Koston 2025-07-15 15:42:55 -10:00 committed by GitHub
parent b1c86fe30e
commit e152690867
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,6 @@ APIServer::APIServer() {
} }
void APIServer::setup() { void APIServer::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->setup_controller(); this->setup_controller();
#ifdef USE_API_NOISE #ifdef USE_API_NOISE
@ -205,16 +204,16 @@ void APIServer::loop() {
void APIServer::dump_config() { void APIServer::dump_config() {
ESP_LOGCONFIG(TAG, ESP_LOGCONFIG(TAG,
"API Server:\n" "Server:\n"
" Address: %s:%u", " Address: %s:%u",
network::get_use_address().c_str(), this->port_); network::get_use_address().c_str(), this->port_);
#ifdef USE_API_NOISE #ifdef USE_API_NOISE
ESP_LOGCONFIG(TAG, " Using noise encryption: %s", YESNO(this->noise_ctx_->has_psk())); ESP_LOGCONFIG(TAG, " Noise encryption: %s", YESNO(this->noise_ctx_->has_psk()));
if (!this->noise_ctx_->has_psk()) { if (!this->noise_ctx_->has_psk()) {
ESP_LOGCONFIG(TAG, " Supports noise encryption: YES"); ESP_LOGCONFIG(TAG, " Supports encryption: YES");
} }
#else #else
ESP_LOGCONFIG(TAG, " Using noise encryption: NO"); ESP_LOGCONFIG(TAG, " Noise encryption: NO");
#endif #endif
} }