Crashlytics log not sent

旧时模样 提交于 2019-12-10 14:47:47

问题


I have Crashlytics properly configured in my app. I can see crash reports.

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.

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.

is this the proper behaviour?

I'm on Android.

To log I just use:

    Crashlytics.log(myLog);

myLog is a non-null non-empty string (I checked it)


回答1:


You are right you need to move the Crashlitycs.start before registering your uncaughtException handler.




回答2:


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.

The only explanation for now is that Crashlitycs uncaughtException handler is called before mine.

So to fix the issue it is enough to register the handler after calling Crashlytics.start



来源:https://stackoverflow.com/questions/21338234/crashlytics-log-not-sent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!