How to log on Fabrics a long message

一世执手 提交于 2019-12-11 02:11:37

问题


I'm trying to write a long text log message on Fabrics system (Android), like this:

Answers.getInstance().logCustom(new CustomEvent("Request:" + requestUrl + "\nResponse:" + json));

The message become cut, and can't find a way to expand it:

Even when the message is added as a custom attribute, like @Alexizamerican suggested,

Answers.getInstance().logCustom(new CustomEvent("Requests"))
       .putCustomAttribute("Request", requestUrl + "\nResponse:" + json)

it stays cut in the Events Dashboard, see picture below:

How to see the whole message?


回答1:


It's best to include longer messages as custom attributes of an event, rather than in the event name. For example:

Answers.getInstance().logCustom(new CustomEvent("Requests"))
       .putCustomAttribute("Request", requestUrl + "\nResponse:" + json)

Check out https://docs.fabric.io/android/answers/answers-events.html#custom-attributes for more details.



来源:https://stackoverflow.com/questions/46390701/how-to-log-on-fabrics-a-long-message

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