wgt-node-utils 0.0.41 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +5 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -319,6 +319,8 @@ class wgtNodeUtils {
|
|
|
319
319
|
* @components 项目名称
|
|
320
320
|
*/
|
|
321
321
|
sendFeiShu = (message, ENV, components = '') => {
|
|
322
|
+
const logMessage = `{'text':'<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${message}'}`;
|
|
323
|
+
|
|
322
324
|
// 发送消息
|
|
323
325
|
this.client.im.message.create({
|
|
324
326
|
params: {
|
|
@@ -327,7 +329,7 @@ class wgtNodeUtils {
|
|
|
327
329
|
data: {
|
|
328
330
|
receive_id: 'oc_aba13955509035daa7a799f30b1b3341',
|
|
329
331
|
msg_type: 'text',
|
|
330
|
-
content:
|
|
332
|
+
content: logMessage,
|
|
331
333
|
uuid: ''
|
|
332
334
|
}
|
|
333
335
|
}).then(res => {
|
|
@@ -366,14 +368,14 @@ class wgtNodeUtils {
|
|
|
366
368
|
console.error(`${title} [${err.config.method}]: ${err.config.url}`);
|
|
367
369
|
console.error(`request: {params: ${JSON.stringify(err.config.params)}, data: ${JSON.stringify(err.config.data)}}`);
|
|
368
370
|
console.error(`response: ${JSON.stringify(err.response)}`);
|
|
369
|
-
this.sendFeiShu(`${title} [${err.config.method}]: ${err.config.url}`, ENV, components);
|
|
371
|
+
// this.sendFeiShu(`${title} [${err.config.method}]: ${err.config.url}`, ENV, components);
|
|
370
372
|
} else {
|
|
371
373
|
console.error(`============${new Date().toLocaleString()}===========`);
|
|
372
374
|
console.error(`${title} ${err}`);
|
|
373
375
|
|
|
374
376
|
console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
|
|
375
377
|
|
|
376
|
-
this.sendFeiShu(`${title} ${err}`, ENV, components);
|
|
378
|
+
// this.sendFeiShu(`${title} ${err}`, ENV, components);
|
|
377
379
|
}
|
|
378
380
|
} catch (e) {
|
|
379
381
|
|