wgt-node-utils 0.0.38 → 0.0.40

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgt-node-utils",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "description": "WGT工具类包",
5
5
  "main": "dist/bundle.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -327,8 +327,7 @@ class wgtNodeUtils {
327
327
  data: {
328
328
  receive_id: 'oc_aba13955509035daa7a799f30b1b3341',
329
329
  msg_type: 'text',
330
-
331
- content: `{\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${message}\"}`,
330
+ content: `{\"text\":\"<b>前端容器node报错</b> \\\\n components: ${components}\\\\n env: ${ENV}, \\\\n message: ${message}\"}`,
332
331
  uuid: ''
333
332
  }
334
333
  }).then(res => {
@@ -355,6 +354,8 @@ class wgtNodeUtils {
355
354
  * @components 项目名称
356
355
  */
357
356
  appendLog = (title, ENV, components = '', err) => {
357
+ console.error('=============err============', err)
358
+ console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
358
359
  try {
359
360
  if (!err) {
360
361
  console.warn(`============${new Date().toLocaleString()}===========`);
@@ -369,12 +370,13 @@ class wgtNodeUtils {
369
370
  } else {
370
371
  console.error(`============${new Date().toLocaleString()}===========`);
371
372
  console.error(`${title} ${err}`);
373
+
372
374
  console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
373
375
 
374
376
  this.sendFeiShu(`${title} ${err}`, ENV, components);
375
377
  }
376
378
  } catch (e) {
377
-
379
+
378
380
  }
379
381
  };
380
382
  /**