fix(wifi): Fixed the max log level not work when it exceeds the default log level

This commit is contained in:
zhangyanjiao
2024-12-11 17:01:44 +08:00
parent 3fda67ee14
commit 6cd700952a

View File

@ -168,6 +168,12 @@ void app_main(void)
}
ESP_ERROR_CHECK(ret);
if (CONFIG_LOG_MAXIMUM_LEVEL > CONFIG_LOG_DEFAULT_LEVEL) {
/* If you only want to open more logs in the wifi module, you need to make the max level greater than the default level,
* and call esp_log_level_set() before esp_wifi_init() to improve the log level of the wifi module. */
esp_log_level_set("wifi", CONFIG_LOG_MAXIMUM_LEVEL);
}
ESP_LOGI(TAG, "ESP_WIFI_MODE_STA");
wifi_init_sta();
}