在没有应用程序崩溃的情况下将日志发送到Crashlytics [英] Send a log to Crashlytics without an app crash

查看:280
本文介绍了在没有应用程序崩溃的情况下将日志发送到Crashlytics的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在没有我的应用程序崩溃的情况下让Crashlytics接收日志?
我有以下代码:

How can I get Crashlytics to receive a log without my app crashing? I have the following code:

if(!context.managedObjectContext save:&error) {
    CLS_LOG(@"%@",error.description)
}

出错时发生,我希望Crashlytics服务器收到错误,但应用程序应继续运行。

When an error occurs, I want the Crashlytics server to receive the error but the app should continue running.

我不需要立即登录。我很乐意在下次重启时获取日志。我只是不想在我的应用程序中触发崩溃来接收日志。

I do not need the log right away. I would be happy to get the log on the next restart. I just do not want to have to trigger a crash in my app to receive the log.

这可能吗?

推荐答案

使用crashlytics的新更新,您现在可以使用:

With the new update from crashlytics you can now use:

[[Crashlytics sharedInstance] recordError:error];

在Swift中:

Crashlytics.sharedInstance().recordError(error)

您可以查看文档此处

这篇关于在没有应用程序崩溃的情况下将日志发送到Crashlytics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆