report

日志上报

import { Log } from "@yl/super-jssdk"

Log.report(message, data, type, options)

Log.report.log(message, data, options)

Log.report.info(message, data, options)

Log.report.debug(message, data, options)

Log.report.warn(message, data, options)

Log.report.error(message, data, options)

Log.report.table(message, data, options)

参数说明

参数 类型 必填 作用
message string 消息的key值
data any 消息主体
type string 消息类型:infologdebugwarnerrortable,根据类型打印不不同格式的消息,默认是 info
options object 扩展参数

options

参数 类型 必填 作用
trackParams Object 天眼插件支持的选填参数,默认值:{moduleName: '', reportmode: 0}
enhanceParams Object 其他增强的选填参数,默认值:{productCode: ''}

trackParams

参数 类型 必填 作用
moduleName string 消息模块名称
reportmode string 上报模式,默认值-0,0:普通模式,1:强制写入文件(hybrid APP),强制上报一次(Web),2:强制上报一次(web&Hybrid APP)

enhanceParams

参数 类型 必填 作用
productCode string 产品code

代码示例

Log.report('用户信息', {name: '张三'});

results matching ""

    No results matching ""