Commit 7201905b by linboxuan

update log

parent 9f0b91a1
......@@ -76,7 +76,7 @@ class APIBase {
if (!result) {
result = system.getResult(null, "请求的方法返回值为空");
}
this.execClient.execLogs("reqPath:" + req.path + "执行结果", pobj, "brg-user-center-doexecOverviewMethod", result, null);
this.execClient.execLogs("reqPath:" + req.path + "执行doexecOverviewMethod结果", pobj, "center-tmtransaction", result, null);
//保存缓存
await this.redisClient.setWithEx(shaStr, JSON.stringify(result), 5);
return result;
......@@ -84,7 +84,7 @@ class APIBase {
var stackStr = error.stack ? error.stack : JSON.stringify(error);
console.log(stackStr, "api调用出现异常,请联系管理员..........")
var rtnerror = system.getResultFail(-200, "系统出现异常");
this.execClient.execLogs("reqPath:" + req.path + "执行异常", pobj, "brg-user-center-doexecOverviewMethod", rtnerror, stackStr);
this.execClient.execLogs("reqPath:" + req.path + "执行doexecOverviewMethod异常", pobj, "center-tm-transaction", rtnerror, stackStr);
if (pobj.Action && action) {
return {
"Response": {
......@@ -132,7 +132,7 @@ class APIBase {
}
result.requestId = pobj.RequestId ? pobj.RequestId : pobj.requestId || uuid.v1();
var tmpResult = reqParams.actionType && reqParams.actionType.indexOf("List") < 0 ? result : { status: result.status, message: result.message, requestId: result.requestId };
this.execClient.execLogs("reqPath:" + req.path + "执行结果", reqParams, "brg-user-center-doexecMethod", tmpResult, null);
this.execClient.execLogs("reqPath:" + req.path + "执行doexecMethod结果", reqParams, "center-tm-transaction", tmpResult, null);
if (pobj.Action && action) {
result = await this.handleTxResult(result);
delete req.body["Action"];
......@@ -146,7 +146,7 @@ class APIBase {
console.log(stackStr, "api调用出现异常,请联系管理员..........")
var rtnerror = system.getResultFail(-200, "系统出现异常");
rtnerror.requestId = pobj.RequestId ? pobj.RequestId : pobj.requestId || uuid.v1();
this.execClient.execLogs("reqPath:" + req.path + "执行异常", reqParams, "brg-user-center-doexecMethod", rtnerror, stackStr);
this.execClient.execLogs("reqPath:" + req.path + "执行doexecMethod异常", reqParams, "center-tm-transaction", rtnerror, stackStr);
if (pobj.Action && action) {
return {
"Response": {
......
......@@ -18,9 +18,9 @@ var settings = {
port: process.env.NODE_PORT || 4006,
opLogUrl: function () {
if (this.env == "dev" || this.env == "test") {
return "http://43.247.184.94:7200/center_channel_log/_doc?pretty";
return "http://43.247.184.94:7200/center-tm-transaction_log/_doc?pretty";
} else {
return "http://43.247.184.94:7200/center_channel_log/_doc?pretty";
return "http://43.247.184.94:7200/center-tm-transaction_log/_doc?pretty";
}
},
opPushUrl: function () {
......
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