Commit 62ee39e4 by 宋毅

tj

parent 8e15ea82
......@@ -8,6 +8,8 @@ class ExecClient {
this.cmdGetPattern = "curl -G -X GET '{url}'";
this.cmdPostTK = "curl -k -H 'Content-type: application/json' -H 'token:{tk}' -H 'request-id:{requestId}' -d '{data}' {url}";
this.cmdJDPostTK = "curl -k -H 'Content-type:text/plain;charset=UTF-8' -H 'metadata:true' -H 'Authorization:{tk}' -d '{data}' {url}";
this.logClient = system.getObject("util.logClient");
}
getUUID() {
var uuid = uuidv4();
......@@ -19,6 +21,7 @@ class ExecClient {
var result = await this.exec(cmd, {
maxBuffer: 1024 * 1024 * 15
});
this.logClient.info("jd", "getUserInfo----->execPostJDTK----FetchPostJDTK----cmd--->result:" + result.stdout);
var rtn = result.stdout;
if (rtn) {
return JSON.parse(rtn);
......@@ -32,6 +35,7 @@ class ExecClient {
var cmd = this.cmdJDPostTK.replace(/\{data\}/g,
data).replace(/\{url\}/g, url).replace(/\{tk\}/g, token);
console.log(cmd);
this.logClient.info("jd", "getUserInfo----->execPostJDTK----FetchPostJDTK----cmd--->" + cmd);
return cmd;
}
async execPostTK(subData, url, token) {
......
......@@ -10,7 +10,7 @@
"type": "file",
"filename": "logs/infoFile/info",
"encoding": "utf-8",
"maxLogSize": 100000000,
"maxLogSize": 1000000000000,
"backups": 5,
"pattern": "-yyyy-MM-dd-hh.log",
"category": "info_file"
......@@ -19,7 +19,7 @@
"type": "file",
"filename": "logs/errorFile/error",
"encoding": "utf-8",
"maxLogSize": 100000000,
"maxLogSize": 1000000000000,
"backups": 5,
"pattern": "-yyyy-MM-dd-hh.log",
"category": "error_file"
......
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