Commit face37be by 宋毅

tj

parent 28502314
......@@ -53,17 +53,18 @@ class APIBase {
await this.redisClient.setWithEx(shaStr, JSON.stringify(result), 3600);
}
var tmpResult = pobj.actionType && pobj.actionType.indexOf("List") < 0 ? result : { status: result.status, message: result.message, requestId: result.requestId };
this.execClientNew.execLogs("reqPath:" + req.path, pobj, "center-channel-doexecMethod", tmpResult, null);
this.execClientNew.execLogs("center-channel-doexecMethod-reqPath:" + req.path, pobj, "center-channel-doexecMethod", tmpResult, null);
return result;
} catch (e) {
console.log(e.stack, "api调用出现异常,请联系管理员..........");
const stackStr = e.stack ? e.stack : JSON.stringify(e);
console.log(stackStr, "api调用出现异常,请联系管理员..........");
this.logCtl.createDb({
appid: req.app.id,
appkey: req.app.uappKey,
requestId: req.requestId,
op: req.classname + "/" + methodname,
content: JSON.stringify(pobj),
resultInfo: JSON.stringify(e.stack),
resultInfo: stackStr,
clientIp: req.clientIp,
agent: req.uagent,
opTitle: "api调用出现异常,请联系管理员error,appKey:" + settings.appKey,
......@@ -78,8 +79,8 @@ class APIBase {
// agent: req.uagent,
// optitle: "api调用出现异常,请联系管理员",
// });
this.execClientNew.execLogs("reqPath异常:" + req.path, pobj, "center-channel-doexecMethod", tmpResult, null);
var rtnerror = system.getResultFail(-200, "出现异常,error:" + e.stack);
this.execClientNew.execLogs("center-channel-doexecMethod-reqPath异常:" + req.path, pobj, "center-channel-doexecMethod", null, stackStr);
var rtnerror = system.getResultFail(-200, "出现异常,error:" + stackStr);
rtnerror.requestId = req.requestId;
return rtnerror;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment