OCT 1. 修改HTTPD部分打印日志等级
This commit is contained in:
parent
f8a9209f5b
commit
8cb42fd06f
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue