mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
Merge branch 'feature/cleanup_wrong_log_use' into 'master'
all: Removes unnecessary newline character in logs Closes IDFGH-10197 See merge request espressif/esp-idf!24131
This commit is contained in:
@@ -141,13 +141,13 @@ TCP/IP 适配器是在 ESP-IDF v4.1 之前使用的网络接口抽象组件。
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
ESP_LOGI(TAG, "got ip:" IPSTR "\n", IP2STR(&event->ip_info.ip));
|
||||
ESP_LOGI(TAG, "got ip:" IPSTR, IP2STR(&event->ip_info.ip));
|
||||
|
||||
不建议使用下述方式:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
ESP_LOGI(TAG, "got ip:%s\n", ip4addr_ntoa(&event->ip_info.ip));
|
||||
ESP_LOGI(TAG, "got ip:%s", ip4addr_ntoa(&event->ip_info.ip));
|
||||
|
||||
``ip4addr_ntoa()`` 为 LwIP API,因此 esp-netif 还提供了替代函数 ``esp_ip4addr_ntoa()``,然而总得来说仍推荐使用 ``IP2STR()`` 这一方法。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user