@wutiange/log-listener-plugin 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
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.2",
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
  })