]> granicus.if.org Git - esp-idf/commitdiff
tcpip_adapter: make log output at debug level less noisy
authorIvan Grokhotkov <ivan@espressif.com>
Wed, 31 Jan 2018 06:01:07 +0000 (14:01 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Sun, 11 Feb 2018 05:06:01 +0000 (13:06 +0800)
At debug log level, tcpip_adapter would print logs for each function
call scheduled onto the tcpip task. These logs contained pointers which
idf_monitor decoded, adding even more noise and useless vertical space
in logs. This change moves these log statements to verbose level.

components/tcpip_adapter/include/tcpip_adapter.h
components/tcpip_adapter/tcpip_adapter_lwip.c

index ab095c87aeb447366af1cf87b8aeb5721db62e69..4777f160571991b0e2b1e9757c9be8539100ecd4 100644 (file)
@@ -184,10 +184,10 @@ typedef struct tcpip_adapter_dns_param_s {
     msg.data     = (void*)(_data);\
     msg.api_fn   = (_fn);\
     if (TCPIP_ADAPTER_IPC_REMOTE == tcpip_adapter_ipc_check(&msg)) {\
-        ESP_LOGD(TAG, "check: remote, if=%d fn=%p\n", (_if), (_fn));\
+        ESP_LOGV(TAG, "check: remote, if=%d fn=%p\n", (_if), (_fn));\
         return msg.ret;\
     } else {\
-        ESP_LOGD(TAG, "check: local, if=%d fn=%p\n", (_if), (_fn));\
+        ESP_LOGV(TAG, "check: local, if=%d fn=%p\n", (_if), (_fn));\
     }\
 }while(0)
 
index ca57338526de1eccfeab07dc14af0f05659ac42d..313e9b1d5819c76703111fd13810c6c561c2efca 100644 (file)
@@ -67,7 +67,7 @@ static sys_sem_t api_sync_sem = NULL;
 static bool tcpip_inited = false;
 static sys_sem_t api_lock_sem = NULL;
 extern sys_thread_t g_lwip_task;
-#define TAG "tcpip_adapter"
+static const char* TAG = "tcpip_adapter";
 
 static void tcpip_adapter_api_cb(void* api_msg)
 {
@@ -79,7 +79,7 @@ static void tcpip_adapter_api_cb(void* api_msg)
     }
 
     msg->ret = msg->api_fn(msg);
-    ESP_LOGD(TAG, "call api in lwip: ret=0x%x, give sem", msg->ret);
+    ESP_LOGV(TAG, "call api in lwip: ret=0x%x, give sem", msg->ret);
     sys_sem_signal(&api_sync_sem);
 
     return;