send-sls-logger 0.0.23 → 0.0.24

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/index.d.ts CHANGED
@@ -19,5 +19,6 @@ declare namespace slsLog {
19
19
  function error(str: string | StringObject): void;
20
20
  function warn(str: string | StringObject): void;
21
21
  function log(str: string | StringObject): void;
22
+ function info(str: string | StringObject): void;
22
23
  function init(config: initConfig): void;
23
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "send-sls-logger",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "阿里云sls的logger发送",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import SlsTracker from "@aliyun-sls/web-track-browser";
2
- import SlsMiniTracker from "@aliyun-sls/web-track-mini";
3
2
 
4
3
  const opts = {
5
4
  host: "", // 所在地域的服务入口。例如cn-hangzhou.log.aliyuncs.com
@@ -63,11 +62,7 @@ export default {
63
62
  Object.assign(defaultLogData, defaultData);
64
63
  Object.assign(opts, options);
65
64
  if (options.host && options.logstore && options.project) {
66
- if (options.isMiniApp) {
67
- tracker = new SlsMiniTracker(opts);
68
- } else {
69
- tracker = new SlsTracker(opts);
70
- }
65
+ tracker = new SlsTracker(opts);
71
66
  }
72
67
  exclude.push(...defaultExclude);
73
68
  },