@wutiange/log-listener-plugin 2.0.1-alpha.4 → 2.0.2-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -160,4 +160,4 @@ type Options = {
160
160
  1. 在配置 baseUrl 的时候,必须填写的是 [log-record](https://github.com/wutiange/log-record) 的地址,也就是你在什么电脑打开的 log-record 客户端,那么这里添加的就是对应电脑的 ip 地址。集成这个插件的 app 端要保证跟 log-record 客户端在同一个局域网下。
161
161
  1. 如果你不知道日志系统的 IP ,可以在日志系统的 `设置 > 链接说明(需要版本大于1.0.9)` 中找到,如下图所示:
162
162
 
163
- ![0cf34d6cd25ee1f725b57dd2d076c336.png](docs/images/0cf34d6cd25ee1f725b57dd2d076c336.png)
163
+ ![0cf34d6cd25ee1f725b57dd2d076c336.png](https://github.com/wutiange/log-listener-plugin/raw/dev/docs/images/0cf34d6cd25ee1f725b57dd2d076c336.png)
@@ -16,6 +16,7 @@ exports.httpInterceptor = void 0;
16
16
  const XHRInterceptor_1 = __importDefault(require("react-native/Libraries/Network/XHRInterceptor"));
17
17
  const FileReader_1 = __importDefault(require("react-native/Libraries/Blob/FileReader"));
18
18
  const utils_1 = require("./utils");
19
+ const logger_1 = __importDefault(require("./logger"));
19
20
  const extractHost = (url) => {
20
21
  var _a, _b;
21
22
  const host = ((_b = (_a = url.split('//')[1]) === null || _a === void 0 ? void 0 : _a.split(':')[0]) === null || _b === void 0 ? void 0 : _b.split('/')[0]) || undefined;
@@ -44,7 +45,7 @@ const getResponseBody = (responseType, response) => __awaiter(void 0, void 0, vo
44
45
  return response !== null && response !== void 0 ? response : null;
45
46
  }
46
47
  catch (error) {
47
- console.warn("getResponseBody---error---", error);
48
+ logger_1.default.warn("getResponseBody---error---", error);
48
49
  return null;
49
50
  }
50
51
  });
@@ -1 +1 @@
1
- {"version":3,"file":"HTTPInterceptor.js","sourceRoot":"","sources":["../../src/HTTPInterceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mGAA2E;AAC3E,wFAAoE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AAC,UAAU,GAAG,MAAM,CAAC;IAC3B,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,cAAc,CAAC,OAA4B,EAAE;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;CASF;AAED,kBAAe,MAAM,CAAC"}
@@ -12,9 +12,3 @@ export declare enum Tag {
12
12
  }
13
13
  export declare const getBaseData: () => Record<string, string>;
14
14
  export declare const getDefaultStorage: () => Storage;
15
- export declare const getErrMsg: (error: any) => {
16
- message: string[];
17
- tag: Tag;
18
- level: Level;
19
- createTime: number;
20
- };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getErrMsg = exports.getDefaultStorage = exports.getBaseData = exports.Tag = exports.Level = exports.LOG_KEY = exports.DEFAULT_TIMEOUT = exports.URLS_KEY = void 0;
6
+ exports.getDefaultStorage = exports.getBaseData = exports.Tag = exports.Level = exports.LOG_KEY = exports.DEFAULT_TIMEOUT = exports.URLS_KEY = void 0;
7
7
  const logger_1 = __importDefault(require("./logger"));
8
8
  exports.URLS_KEY = 'log-listener-plugin-urls$$SetKey';
9
9
  exports.DEFAULT_TIMEOUT = 3000;
@@ -51,16 +51,4 @@ const getDefaultStorage = () => {
51
51
  }
52
52
  };
53
53
  exports.getDefaultStorage = getDefaultStorage;
54
- const getErrMsg = (error) => {
55
- var _a;
56
- return {
57
- message: [
58
- `${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}--->这是@wutiange/log-listener-plugin内部错误,请提issue反馈,issue地址:https://github.com/wutiange/log-listener-plugin/issues`,
59
- ],
60
- tag: Tag.LOG_PLUGIN_INTERNAL_ERROR,
61
- level: Level.ERROR,
62
- createTime: Date.now(),
63
- };
64
- };
65
- exports.getErrMsg = getErrMsg;
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AAC,CAAA;AAPY,QAAA,iBAAiB,qBAO7B"}
@@ -26,10 +26,7 @@ class LogPlugin {
26
26
  this.storage = (0, common_1.getDefaultStorage)();
27
27
  this.init = () => __awaiter(this, void 0, void 0, function* () {
28
28
  this.server = new Server_1.default();
29
- if (!this.storage) {
30
- logger_1.default.warn(common_1.LOG_KEY, '你并没有设置 storage ,这会导致 App 杀死后可能需要重新加入日志系统才能收集日志数据,建议你设置 storage 。');
31
- }
32
- else {
29
+ if (this.storage) {
33
30
  const urlsStr = yield this.storage.getItem(common_1.URLS_KEY);
34
31
  if (urlsStr) {
35
32
  const urls = JSON.parse(urlsStr);
@@ -68,16 +65,25 @@ class LogPlugin {
68
65
  };
69
66
  this.startRecordLog = () => {
70
67
  console.log = (...data) => {
71
- logger_1.default.log(...data);
72
68
  this.log(...data);
69
+ if (!__DEV__) {
70
+ return;
71
+ }
72
+ logger_1.default.log(...data);
73
73
  };
74
74
  console.warn = (...data) => {
75
- logger_1.default.warn(...data);
76
75
  this.warn(...data);
76
+ if (!__DEV__) {
77
+ return;
78
+ }
79
+ logger_1.default.warn(...data);
77
80
  };
78
81
  console.error = (...data) => {
79
- logger_1.default.error(...data);
80
82
  this.error(...data);
83
+ if (!__DEV__) {
84
+ return;
85
+ }
86
+ logger_1.default.error(...data);
81
87
  };
82
88
  };
83
89
  this.stopRecordLog = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"logPlugin.js","sourceRoot":"","sources":["../../src/logPlugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAA8B;AAC9B,mCAAuD;AACvD,uDAAoD;AACpD,qCAA6F;AAC7F,sDAA8B;AA4B9B,MAAM,SAAS;IAMb;QALQ,WAAM,GAAkB,IAAI,CAAC;QAC7B,YAAO,GAAkB,IAAI,CAAC;QAC9B,WAAM,GAAG,KAAK,CAAA;QACd,YAAO,GAAmB,IAAA,0BAAiB,GAAE,CAAC;QAM9C,SAAI,GAAG,GAAS,EAAE;YACxB,IAAI,CA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AK,CAAC,GAAG,EAAE,YAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;QAC7C,CAAC,CAAA;QAED,SAAI,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;YACxB,IAAI,CAAC,IAAI,CAAC,cAAK,CAAC,IAAI,EAAE,YAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;QAC9C,CAAC,CAAA;QAED,UAAK,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,cAAK,CAAC,KAAK,EAAE,YAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;QAC/C,CAAC,CAAA;QAzLC,IAAI,CAAC,IAAI,EAAE,CAAA;IACb,CAAC;CA0LF;AACD,MAAM,aAAa,GAAG,IAAA,oCAA4B,EAAC,SAAS,CAAC,CAAA;AAEpD,sCAAa;AADtB,MAAM,SAAS,GAAG,IAAI,aAAa,EAAE,CAAC;AAEtC,kBAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wutiange/log-listener-plugin",
3
- "version": "2.0.1-alpha.4",
3
+ "version": "2.0.2-alpha.1",
4
4
  "description": "log-record 客户端对应的的插件\r\nLog-record client corresponding plugin",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,6 +2,7 @@ import XHRInterceptor from 'react-native/Libraries/Network/XHRInterceptor';
2
2
  import BlobFileReader from 'react-native/Libraries/Blob/FileReader';
3
3
  import {Blob} from 'buffer';
4
4
  import { createClassWithErrorHandling, formDataToString } from './utils';
5
+ import logger from './logger';
5
6
 
6
7
  type StartNetworkLoggingOptions = {
7
8
  /** List of hosts to ignore, e.g. `services.test.com` */
@@ -86,7 +87,7 @@ const getResponseBody = async (responseType: string, response: any) => {
86
87
  }
87
88
  return response ?? null;
88
89
  } catch (error) {
89
- console.warn("getResponseBody---error---", error)
90
+ logger.warn("getResponseBody---error---", error)
90
91
  return null;
91
92
  }
92
93
  };
package/src/Server.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { hasPort, sleep } from "./utils";
2
2
  import Zeroconf from "react-native-zeroconf";
3
- import { getBaseData, getErrMsg, LOG_KEY } from "./common";
3
+ import { getBaseData, LOG_KEY } from "./common";
4
4
  import logger from "./logger";
5
5
  import md5 from 'crypto-js/md5';
6
6
 
package/src/common.ts CHANGED
@@ -55,16 +55,3 @@ export const getDefaultStorage = (): Storage => {
55
55
  }
56
56
  }
57
57
 
58
-
59
- export const getErrMsg = (error: any) => {
60
- return {
61
- message: [
62
- `${
63
- error?.message ?? error
64
- }--->这是@wutiange/log-listener-plugin内部错误,请提issue反馈,issue地址:https://github.com/wutiange/log-listener-plugin/issues`,
65
- ],
66
- tag: Tag.LOG_PLUGIN_INTERNAL_ERROR,
67
- level: Level.ERROR,
68
- createTime: Date.now(),
69
- }
70
- }
package/src/logPlugin.ts CHANGED
@@ -42,9 +42,8 @@ class LogPlugin {
42
42
 
43
43
  private init = async () => {
44
44
  this.server = new Server();
45
- if (!this.storage) {
46
- logger.warn(LOG_KEY, '你并没有设置 storage ,这会导致 App 杀死后可能需要重新加入日志系统才能收集日志数据,建议你设置 storage 。')
47
- } else {
45
+
46
+ if (this.storage) {
48
47
  const urlsStr = await this.storage.getItem(URLS_KEY)
49
48
  if (urlsStr) {
50
49
  const urls = JSON.parse(urlsStr)
@@ -91,18 +90,27 @@ class LogPlugin {
91
90
 
92
91
  startRecordLog = () => {
93
92
  console.log = (...data: any[]) => {
94
- logger.log(...data)
95
93
  this.log(...data);
94
+ if (!__DEV__) {
95
+ return
96
+ }
97
+ logger.log(...data)
96
98
  };
97
99
 
98
100
  console.warn = (...data: any[]) => {
99
- logger.warn(...data)
100
101
  this.warn(...data);
102
+ if (!__DEV__) {
103
+ return
104
+ }
105
+ logger.warn(...data)
101
106
  };
102
107
 
103
108
  console.error = (...data: any[]) => {
104
- logger.error(...data)
105
109
  this.error(...data);
110
+ if (!__DEV__) {
111
+ return
112
+ }
113
+ logger.error(...data)
106
114
  };
107
115
  }
108
116
 
package/dist/console.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/console.js DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const logPlugin_1 = __importDefault(require("./src/logPlugin"));
7
- const common = require('./src/common');
8
- console.log = (...data) => {
9
- logPlugin_1.default.log(...data);
10
- common.log(...data);
11
- };
12
- console.warn = (...data) => {
13
- logPlugin_1.default.warn(...data);
14
- common.warn(...data);
15
- };
16
- console.error = (...data) => {
17
- logPlugin_1.default.error(...data);
18
- common.error(...data);
19
- };
20
- //# sourceMappingURL=console.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"console.js","sourceRoot":"","sources":["../console.ts"],"names":[],"mappings":";;;;;AAKA,gEAAqC;AACrC,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACvC,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;IAC/B,mBAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IACpB,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;IAChC,mBAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACrB,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;IACjC,mBAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IACtB,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AACxB,CAAC,CAAC"}
package/dist/fetch.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/fetch.js DELETED
@@ -1,48 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const index_1 = __importDefault(require("./index"));
16
- const utils_1 = require("./src/utils");
17
- const common = require('./src/common');
18
- global.fetch = (input, init) => __awaiter(void 0, void 0, void 0, function* () {
19
- const uniqueId = (Date.now() + Math.random()).toString(16);
20
- index_1.default.uniqueReq(uniqueId, input, init);
21
- let isFetchFinished = false;
22
- let isTimeout = false;
23
- const timeout = index_1.default.getTimeout();
24
- if (timeout !== null) {
25
- (0, utils_1.sleep)(timeout).then(() => {
26
- if (!isFetchFinished) {
27
- isTimeout = true;
28
- index_1.default.resTimeout(uniqueId);
29
- }
30
- });
31
- }
32
- try {
33
- const response = yield common.tempFetch(input, init);
34
- isFetchFinished = true;
35
- if (response instanceof Response && !isTimeout) {
36
- index_1.default.uniqueRes(uniqueId, response.clone());
37
- }
38
- return response;
39
- }
40
- catch (error) {
41
- isFetchFinished = true;
42
- if (!isTimeout) {
43
- index_1.default.resResponseError(uniqueId);
44
- }
45
- throw new Error(error);
46
- }
47
- });
48
- //# sourceMappingURL=fetch.js.map
package/dist/fetch.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch.js","sourceR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,eAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACpC,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;AACH,CAAC,CAAA,CAAC"}
@@ -1 +0,0 @@
1
- import '../../console';
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- require("../../console");
7
- const index_1 = __importDefault(require("../../index"));
8
- describe("重写日志", () => {
9
- it("log 没有提前设置 url", () => {
10
- console.log("log 是否正常打印");
11
- expect(1).toBe(1);
12
- });
13
- it("log 提前设置了 url", () => {
14
- index_1.default.setBaseUrl("http://192.168.118.103");
15
- console.log("log 是否正常打印");
16
- expect(1).toBe(1);
17
- });
18
- it('warn', () => {
19
- index_1.default.setBaseUrl("http://192.168.118.103");
20
- console.warn("warn 是否正常打印");
21
- expect(1).toBe(1);
22
- });
23
- it('error', () => {
24
- index_1.default.setBaseUrl("http://192.168.118.103");
25
- console.error("error 是否正常打印");
26
- expect(1).toBe(1);
27
- });
28
- });
29
- //# sourceMappingURL=console.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"console.test.js","sourceRoot":"","sources":["../../../src/__tests__/console.test.ts"],"names":[],"mappings":";;;;;AAAA,yBAAsB;AACtB,wDAAgC;AAChC,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACpB,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;QACxB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;QACzB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;QACvB,eAAM,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAA;QAC3C,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;QACzB,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACd,eAAM,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAA;QAC3C,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAC3B,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QACf,eAAM,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAA;QAC3C,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;QAC7B,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
File without changes
File without changes