ios - 为什么 Crashlytics 中缺少 CLSLog 消息?

标签 ios swift crashlytics

我有一个应用程序将其崩溃记录到 Fabric 的 Crashlytics 平台。

崩溃日志记录按预期工作,因为可以通过平台的仪表板观察到。但是,对命令 CLSLog 的调用似乎没有按预期工作。崩溃 session 的日志面板未显示正确的日志输出。

crashlytics session detail log

这就是我们在应用程序中使用 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/

相关文章:

ios - 检查 View 是在 Popover 中显示还是全屏显示

iOS 委托(delegate)与 KVO 的问题

ios - IOS中一个UIView两次添加到另一个UIView会发生什么?

ios - 在 Collection View 中预加载 MKMapView

macos - 在 NSTextField 上按下 Enter 键时如何做某事

ios - 获取用于调试应用程序的 Crashlytics DSYM

android - NullPointerException : int android. 部件.Editor$SelectionModifierCursorController.getMinTouchOffset()

ios - 如何拍照并将其传递给另一个 View Controller

iphone - 如何在 Swift 中显示 UIImage

iOS SIGABRT 即将推出