1.1.11 • Published 6 months ago

@zxhy-npm/send-sls-logger v1.1.11

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

PC 使用方式

import SLSLog from '@zxhy-npm/send-sls-logger';

const slsLog = SLSLog({});
slsLog.init({
  defaultData: logDefaultData, // 默认带的数据
  defaultExclude: ["模拟器", "ResizeObserver"], // 需要排除的数据
  options: {
    host: host, // 所在地域的服务入口。例如cn-hangzhou.log.aliyuncs.com
    project: project, // Project名称。
    logstore: logstore, // Logstore名称。
  },
});
slsLog.error({ msg: "这是一条错误日志" });
slsLog.warn({ msg: "这是一条警告日志" });
slsLog.log({ msg: "这是一条默认日志" });
slsLog.info({ msg: "这是一条默认日志" });

小程序 使用方式

import MiniLog from "@zxhy-npm/send-sls-logger/lib/mini";

const miniLog = MiniLog({});
miniLog.init({
  defaultData: logDefaultData, // 默认带的数据
  defaultExclude: ["模拟器", "ResizeObserver"], // 需要排除的数据
  options: {
    host: host, // 所在地域的服务入口。例如cn-hangzhou.log.aliyuncs.com
    project: project, // Project名称。
    logstore: logstore, // Logstore名称。
  },
});
miniLog.error({ msg: "这是一条错误日志" });
miniLog.warn({ msg: "这是一条警告日志" });
miniLog.log({ msg: "这是一条默认日志" });
miniLog.info({ msg: "这是一条默认日志" });

更新备注

0.0.6 ---------- 2022-11-23 16:59:00
更新内容: 增加 ts 解析器 0.0.41 ---------- 2023-02-10 14:51:18
更新内容: 增加使用说明
1.1.0 ---------- 12/15/2024, 3:05:43 PM
更新内容: 增加了 initTrace 的方法, 只支持PC项目,监听 dom的进入试图,以及点击事件,需要在dom增加 data-module、data-click 对应的属性 1.1.2 ---------- 12/16/2024, 3:45:22 PM
更新内容: 会自动删除 预发送数据 中的 undefined 与 null
1.1.4 ---------- 1/10/2025, 11:35:16 AM
更新内容: trace 导出deviceInfo 以及 referUrl
1.1.5 ---------- 1/10/2025, 11:40:55 AM
更新内容: sls 打日志的时候,将deviceInfo、referUrl、pagePath, pageName直接带进去,不需要使用者增加

1.1.11

6 months ago

1.1.10

6 months ago

1.1.9

6 months ago

1.1.8

6 months ago

1.1.7

6 months ago

1.1.6

6 months ago

1.1.5

6 months ago

1.1.4

6 months ago

1.1.1

6 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.1.0

7 months ago

1.0.4-beta.1

7 months ago

1.0.4-beta.2

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3-beta.2

7 months ago

1.0.3-beta.1

7 months ago

1.0.3-beta.3

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

0.0.1

1 year ago