@antglobal/rlog-sdk 0.0.1755855517-dev.3 → 0.0.1755855517-dev.5

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/README.md CHANGED
@@ -10,6 +10,8 @@ SDK 现在支持从 CDN 获取动态配置,可以实时调整以下参数:
10
10
 
11
11
  ### 2. 配置参数说明
12
12
  CDN 配置文件应为 JSON 格式,包含以下字段:
13
+
14
+ #### 基础配置
13
15
  ```json
14
16
  {
15
17
  "enable": true, // 采集总开关
@@ -19,6 +21,28 @@ CDN 配置文件应为 JSON 格式,包含以下字段:
19
21
  }
20
22
  ```
21
23
 
24
+ #### Console录制插件详细配置
25
+ ```json
26
+ {
27
+ "console": {
28
+ "enable": true, // 是否启用console录制
29
+ "level": ["log", "warn", "error", "info"], // 需要录制的console方法
30
+ "lengthThreshold": 1000, // 最大录制条数,默认1000
31
+ "stringifyOptions": {
32
+ "stringLengthLimit": 500, // 字符串长度限制
33
+ "numOfKeysLimit": 50, // 对象key数量限制,默认50
34
+ "depthOfLimit": 4 // 对象深度限制,默认4
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ **支持的console方法级别**:
41
+ - `assert`, `clear`, `count`, `countReset`
42
+ - `debug`, `dir`, `dirxml`, `error`
43
+ - `group`, `groupCollapsed`, `groupEnd`, `info`
44
+ - `log`, `table`, `time`, `timeEnd`, `timeLog`, `trace`, `warn`
45
+
22
46
  ### 3. 使用方式
23
47
  ```javascript
24
48
  // 初始化时传入 CDN 配置 URL