wgt-node-utils 0.0.45 → 0.0.47

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgt-node-utils",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "description": "WGT工具类包",
5
5
  "main": "dist/bundle.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -319,7 +319,7 @@ 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}'}`;
322
+ const logMessage = `{"text":"<b>前端容器node报错</b>\\ncomponents: ${components}\\nenv: ${ENV}, \\nmessage: ${message}"}`;
323
323
  console.log(logMessage, '=============logMessage================')
324
324
  // 发送消息
325
325
  this.client.im.message.create({
@@ -356,9 +356,8 @@ class wgtNodeUtils {
356
356
  * @components 项目名称
357
357
  */
358
358
  appendLog = (title, ENV, components = '', err) => {
359
- console.log('------------------err----------------', err)
360
- console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
361
359
  try {
360
+ console.log()
362
361
  if (!err) {
363
362
  console.warn(`============${new Date().toLocaleString()}===========`);
364
363
  console.warn(title);
@@ -372,13 +371,10 @@ class wgtNodeUtils {
372
371
  } else {
373
372
  console.error(`============${new Date().toLocaleString()}===========`);
374
373
  console.error(`${title} ${err}`);
375
-
376
- console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
377
-
378
374
  this.sendFeiShu(`${title} ${err}`, ENV, components);
379
375
  }
380
376
  } catch (e) {
381
- console.log(e, 'e')
377
+ console.log(e, '=============catch==============')
382
378
  }
383
379
  };
384
380
  /**