sentryLogSwitch

sentry日志上传开关

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

MicCore.sentryLogSwitch(optional)

注意

APP切换至后台时,设置将不生效

参数说明

参数 类型 必填 作用
optional Object 选填参数

optional

参数 类型 必填 作用
options object 自定义参数

options

参数 类型 必填 作用
isOff boolean 是否关闭上传,默认为false
info_switch_on boolean 设置上传信息类别日志,默认false.

返回说明

参数 类型 作用
resolve() Function 成功回调
reject(err) Function 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"}

代码示例


MicCore.sentryLogSwitch()
  .then((res) => {
    console.log(res);
  })
  .catch(err => {
    console.log('插件调用失败:', err)
  })

results matching ""

    No results matching ""