我有一个应用程序将其崩溃记录到 Fabric 的 Crashlytics 平台。
崩溃日志记录按预期工作,因为可以通过平台的仪表板观察到。但是,对命令 CLSLog
的调用似乎没有按预期工作。崩溃 session 的日志面板未显示正确的日志输出。
这就是我们在应用程序中使用 CLSLog
的方式:
CLSLogv(消息, getVaList([""]))
谁能指出这个问题的可能原因是什么?
最佳答案
您的 CLSLogv
格式似乎有误。请尝试如下所示
CLSLogv("%@", getVaList([message]))
因为根据 Fabric 定制日志doc
Swift string interpolation will not result in a compile-time constant string. Just like with printf and NSLog, using a non-constant string with CLSLog can result in a crash.
关于ios - 为什么 Crashlytics 中缺少 CLSLog 消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51888900/