From 36136017c3e93dc8e5494f06ac92ee7b02c7be7b Mon Sep 17 00:00:00 2001 From: armink Date: Mon, 17 Sep 2018 20:05:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=AE=8C=E5=96=84=E3=80=91=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=AE=9A=E4=B9=89=EF=BC=8C=E7=A7=BB=E9=99=A4=E5=A4=B4?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=AD=E7=9A=84=E5=AE=9A=E4=B9=89=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: armink --- inc/webclient.h | 15 --------------- src/webclient.c | 10 ++++++++++ src/webclient_file.c | 10 ++++++++++ 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/inc/webclient.h b/inc/webclient.h index c32dbf6..b4b435b 100644 --- a/inc/webclient.h +++ b/inc/webclient.h @@ -27,21 +27,6 @@ extern "C" { #endif -#undef DBG_SECTION_NAME -#undef DBG_LEVEL -#undef DBG_COLOR -#undef DBG_ENABLE - -#define DBG_ENABLE -#define DBG_SECTION_NAME "WEB" -#ifdef WEBCLIENT_DEBUG -#define DBG_LEVEL DBG_LOG -#else -#define DBG_LEVEL DBG_INFO -#endif /* WEBCLIENT_DEBUG */ -#define DBG_COLOR -#include - #ifndef web_malloc #define web_malloc rt_malloc #endif diff --git a/src/webclient.c b/src/webclient.c index 3287e46..3e972bc 100644 --- a/src/webclient.c +++ b/src/webclient.c @@ -28,6 +28,16 @@ #include #endif /* RT_USING_SAL */ +#define DBG_ENABLE +#define DBG_SECTION_NAME "web" +#ifdef WEBCLIENT_DEBUG +#define DBG_LEVEL DBG_LOG +#else +#define DBG_LEVEL DBG_INFO +#endif /* WEBCLIENT_DEBUG */ +#define DBG_COLOR +#include + /* default receive or send timeout */ #define WEBCLIENT_DEFAULT_TIMEO 6 diff --git a/src/webclient_file.c b/src/webclient_file.c index d31fadc..0e8da37 100644 --- a/src/webclient_file.c +++ b/src/webclient_file.c @@ -17,6 +17,16 @@ #ifdef RT_USING_DFS #include +#define DBG_ENABLE +#define DBG_SECTION_NAME "web.file" +#ifdef WEBCLIENT_DEBUG +#define DBG_LEVEL DBG_LOG +#else +#define DBG_LEVEL DBG_INFO +#endif /* WEBCLIENT_DEBUG */ +#define DBG_COLOR +#include + /** * send GET request and store response data into the file. *