问题描述
我有Crashlytics在我的应用程序正确配置。我可以看到崩溃报告。
I have Crashlytics properly configured in my app. I can see crash reports.
我想自定义日志添加到崩溃报告,但我没有看到任何报告。
我试着日志搬出uncaughtException处理程序,并在这种情况下,我看到了日志。
I tried to add a custom log to the crash reports but I do not see anything in the report.I tried to move the log out of the uncaughtException handler and in that case I see the logs.
所以,如果我登录,而在应用程序运行正常,然后我看到在崩溃报告日志时,应用程序崩溃,但如果我尝试在我的uncaughtException处理程序添加日志这些日志不显示。
So if I log while the application is running properly then I see the logs in the crash report when the application crashes but if I try to add a log in my uncaughtException handler these logs are not shown.
这是正确的行为?
我在Android上。
I'm on Android.
要登录我只是用:
Crashlytics.log(myLog);
myLog是一个非空非空字符串(我检查)
myLog is a non-null non-empty string (I checked it)
推荐答案
我认为,一个可能的解释是该日志被异步发送到服务器,如果该应用程序就会被杀死,他们被送到之前,你没有看到他们在崩溃报告。我查了一下,这是不是这样的:调用默认的处理程序没有发生之前,即使你等待一段时间。
I thought that an explanation could be that the logs are sent to the server asynchronously and if the application gets killed before they are sent you don't see them in the crash report. I checked and that is not the case: even if you wait for a while before calling the default handler nothing happen.
目前,唯一的解释是,Crashlitycs uncaughtException处理程序我之前调用。
The only explanation for now is that Crashlitycs uncaughtException handler is called before mine.
我会检查它。
这篇关于Crashlytics日志未发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!