log打印日志

log ^6.8

打印日志

#请求参数

Prop Type Required Default Comment
level String Y - 日志级别(Debug/Info/Warn/Error)
message String Y - 日志内容

#参数代码示例

let params = {
  level: 'Info',
  message: 'info from weex by bridgeService'
}

#接口调用示例

const params = {
  level: 'Info',
  message: 'info from weex by bridgeService'
}
this.$bridge
  .log(params)
  .then(res => {
    this.$alert(res)
  })
  .catch(err => {
    this.$toast(err)
  })

#返回参数

  • 成功时不返回

  • 失败时(level 或者 message 为空或者没有)返回

Prop Type Value
code Number -2
msg json 解析失败

#返回示例

//成功时不返回

#FAQ

tip

1.日志保存路径:
iOS:Documents/MeiJuLog/\*\*\*.log,6.8 及以后版本改用 TMF 的 xlog 日志路径在 Library/TMF/Log

posted on 2024-12-12 09:18  AtlasLapetos  阅读(11)  评论(0)    收藏  举报