@wutiange/log-listener-plugin 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -45,13 +45,13 @@ class Logger {
45
45
  this.server.log(sendData);
46
46
  }
47
47
  log(...data) {
48
- this._log('log', data);
48
+ this._log('log', ...data);
49
49
  }
50
50
  warn(...data) {
51
- this._log('warn', data);
51
+ this._log('warn', ...data);
52
52
  }
53
53
  error(...data) {
54
- this._log('error', data);
54
+ this._log('error', ...data);
55
55
  }
56
56
  req(input, init) {
57
57
  var _a;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sDAA6B;AAG7B,MAAM,MAAM;IAAZ;QAEU,WAAM,GAAkB,IAAI,CAAA;IA0EtC,CAAC;IAvEC,UAAU,CAAC,GAAW;QACpB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;QAC5B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,GAAG,IAAI,gBAAM,CAAC,GAAG,CAAC,CAAA;QAC/B,CAAC;IACH,CAAC;IAED,WAAW,CAAC,IAAyB;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;IACtB,CAAC;IAEO,kBAAkB;QACxB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;QAClE,CAAC;IACH,CAAC;IAEO,mBAAmB;QACzB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;QAC5C,CAAC;IACH,CAAC;IAEO,IAAI,CAAC,KAAa,EAAE,GAAG,IAAW;QACxC,IAAI,CAAC,kBAAkB,EAAE,CAAA;QACzB,IAAI,CAAC,mBAAmB,EA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AO,EAAE,IAAI,CAAC,GAAG,EAAE,EACnB,SAAS,IACT,CAAA;QACJ,CAAC;KAAA;CACF;AAGD,kBAAe,IAAI,MAAM,EAAE,CAAA"}
package/dist/server.js CHANGED
@@ -20,7 +20,7 @@ class Server {
20
20
  const result = yield fetch(`${this.baseUrl}:${this.port}/${path}`, {
21
21
  method: 'POST',
22
22
  headers: {
23
- 'Content-Type': 'application/json;charset:utf-8'
23
+ 'Content-Type': 'application/json;charset=utf-8'
24
24
  },
25
25
  body: JSON.stringify(data)
26
26
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wutiange/log-listener-plugin",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "这是log-record的插件,如果需要使用这个日志监听,那么就需要把这个插件安装到项目中",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -43,15 +43,15 @@ class Logger {
43
43
  }
44
44
 
45
45
  log(...data: any[]) {
46
- this._log('log', data)
46
+ this._log('log', ...data)
47
47
  }
48
48
 
49
49
  warn(...data: any[]) {
50
- this._log('warn', data)
50
+ this._log('warn', ...data)
51
51
  }
52
52
 
53
53
  error(...data: any[]) {
54
- this._log('error', data)
54
+ this._log('error', ...data)
55
55
  }
56
56
 
57
57
  async req(input: RequestInfo | URL, init?: RequestInit) {
package/src/server.ts CHANGED
@@ -9,7 +9,7 @@ class Server {
9
9
  const result = await fetch(`${this.baseUrl}:${this.port}/${path}`, {
10
10
  method: 'POST',
11
11
  headers: {
12
- 'Content-Type': 'application/json;charset:utf-8'
12
+ 'Content-Type': 'application/json;charset=utf-8'
13
13
  },
14
14
  body: JSON.stringify(data)
15
15
  })