From 8cb42fd06ffdd12f3325efa9a9e69a62ff1009bc Mon Sep 17 00:00:00 2001 From: huangxin Date: Wed, 22 Feb 2023 16:01:20 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E4=BF=AE=E6=94=B9HTTPD=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- srcs/libs/network/http_svr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srcs/libs/network/http_svr.c b/srcs/libs/network/http_svr.c index e54786f..e6e7092 100644 --- a/srcs/libs/network/http_svr.c +++ b/srcs/libs/network/http_svr.c @@ -45,7 +45,7 @@ static void rsp_err_msg(struct mg_connection *c, int httpCode, int errCode) { mg_http_reply(c, httpCode, "Content-Type: application/json\r\n", "%s\n", pStrPro ? pStrPro : ""); - LOG_MOD(info, ZLOG_MOD_HTTPD, "Response(%d): %s\n", httpCode, pStrPro); + LOG_MOD(debug, ZLOG_MOD_HTTPD, "Response(%d): %s\n", httpCode, pStrPro); if (pStrPro) { free((void *)pStrPro); @@ -67,7 +67,11 @@ static void on_mg_event_cb(struct mg_connection *c, int ev, void *ev_data, void pItem->pCallbackHandler(hm, pItem->pUserData, pCtx); if (pCtx->errCode == ERR_SUCCESS && pCtx->pRspData) { mg_http_reply(c, pCtx->httpCode, pCtx->pRspHeads, "%s\n", pCtx->pRspData); - LOG_MOD(info, ZLOG_MOD_HTTPD, "Response:(%d) %s\n", pCtx->httpCode, (char *)pCtx->pRspData); + LOG_MOD(debug, + ZLOG_MOD_HTTPD, + "Response:(%d) %s\n", + pCtx->httpCode, + (char *)pCtx->pRspData); } else { rsp_err_msg(c, pCtx->httpCode, pCtx->errCode); }