@pisell/core 1.0.48 → 1.0.49

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.
@@ -449,26 +449,27 @@ var LoggerManager = /*#__PURE__*/function () {
449
449
  return (_this$db2 = this.db) === null || _this$db2 === void 0 ? void 0 : _this$db2.clear("logs");
450
450
  case 17:
451
451
  console.log("-------- 清空IndexDB日志成功");
452
- _context5.next = 25;
452
+ _context5.next = 24;
453
453
  break;
454
454
  case 20:
455
455
  _context5.prev = 20;
456
456
  _context5.t0 = _context5["catch"](0);
457
457
  console.log("-------- 存储日志到IndexDB 失败", _context5.t0);
458
- this.sendFeishuNotification({
459
- type: "error",
460
- title: "存储IndexDB日志到AWS失败",
461
- metadata: {
462
- error: {
463
- name: _context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.name,
464
- message: _context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.message,
465
- stack: _context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.stack
466
- }
467
- }
468
- });
458
+
459
+ // this.sendFeishuNotification({
460
+ // type: "error",
461
+ // title: "存储IndexDB日志到AWS失败",
462
+ // metadata: {
463
+ // error: {
464
+ // name: error?.name,
465
+ // message: error?.message,
466
+ // stack: error?.stack,
467
+ // }
468
+ // },
469
+ // });
469
470
  // 重新抛出错误,让外层 catch 能够捕获
470
471
  throw _context5.t0;
471
- case 25:
472
+ case 24:
472
473
  case "end":
473
474
  return _context5.stop();
474
475
  }
@@ -64,7 +64,7 @@ export var createRequest = function createRequest(props) {
64
64
  // 如果请求计数超过最大请求数,则记录为警告日志
65
65
  if (requestCount > ((logger === null || logger === void 0 ? void 0 : logger.maxRequestCount) || 6)) {
66
66
  app.logger.addLog({
67
- type: 'warning',
67
+ type: 'info',
68
68
  title: "[ Request ]: Max Request Count - ".concat(requestCount),
69
69
  metadata: {
70
70
  requestCount: requestCount
@@ -96,7 +96,7 @@ export var createRequest = function createRequest(props) {
96
96
  }
97
97
  app.logger.addLog({
98
98
  type: type,
99
- title: "[ Request ]: Complete - ".concat(requestId),
99
+ title: "[ Request ]: Complete - ".concat(requestId, " \u8D85\u8FC75s"),
100
100
  metadata: {
101
101
  error: isError ? JSON.stringify(result) : '',
102
102
  duration: "".concat((duration / 1000).toFixed(2), "s"),
@@ -287,17 +287,6 @@ var LoggerManager = class {
287
287
  console.log("-------- 清空IndexDB日志成功");
288
288
  } catch (error) {
289
289
  console.log("-------- 存储日志到IndexDB 失败", error);
290
- this.sendFeishuNotification({
291
- type: "error",
292
- title: "存储IndexDB日志到AWS失败",
293
- metadata: {
294
- error: {
295
- name: error == null ? void 0 : error.name,
296
- message: error == null ? void 0 : error.message,
297
- stack: error == null ? void 0 : error.stack
298
- }
299
- }
300
- });
301
290
  throw error;
302
291
  }
303
292
  }
@@ -76,7 +76,7 @@ var createRequest = (props) => {
76
76
  });
77
77
  if (requestCount > ((logger == null ? void 0 : logger.maxRequestCount) || 6)) {
78
78
  app.logger.addLog({
79
- type: "warning",
79
+ type: "info",
80
80
  title: `[ Request ]: Max Request Count - ${requestCount}`,
81
81
  metadata: {
82
82
  requestCount
@@ -100,7 +100,7 @@ var createRequest = (props) => {
100
100
  }
101
101
  app.logger.addLog({
102
102
  type,
103
- title: `[ Request ]: Complete - ${requestId2}`,
103
+ title: `[ Request ]: Complete - ${requestId2} 超过5s`,
104
104
  metadata: {
105
105
  error: isError ? JSON.stringify(result) : "",
106
106
  duration: `${(duration / 1e3).toFixed(2)}s`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/core",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",