How to send Crashlytics log

可紊 提交于 2020-01-12 13:54:18

问题


I am using Crashlytics (now known as Fabric) in my app.

It works well when the app crashes. I can find the issue on the dashboard.

I am trying to use the logging. Something like:

Crashlytics.log(Log.WARN,MYTAG,"Error message");

I am not able to send this log in the dashboard. I have just tried to add something like:

Crashlytics.logException(new RuntimeException("Fake exception"));

but it doesn't send the log.

Can Crashlytics send the log?


回答1:


You are sending the Log properly. But see what Official doc says Logging Caught Exceptions

All logged exceptions will appear as "non-fatal" issues in the Crashlytics dashboard.

To reduce your users' network traffic, Crashlytics batches logged exceptions together and sends them the next time the app launches. If you don't see logged exceptions in your Crashlytics web dashboard, try restarting your app!




回答2:


In Android, send a custom crash by using

Crashlytics.logException(new RuntimeException("Fake exception"));

Then restart your application

In Crashlytics, select the Non-Fatals



来源:https://stackoverflow.com/questions/29693411/how-to-send-crashlytics-log

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