Worklight Analytics payload

陌路散爱 提交于 2019-12-07 00:57:27

All calls other than

WL.Analytics.log('my record')

were intended for Analytics features that were not implemented or did not make it into the Worklight 6.2 release. Clearly this is not reflected in the documentation. I will open a defect to either have the logs searchable or have this limitation reflected in the documentation.

If the following call:

WL.Analytics.log({_activity: "myActivity" });

does not result in activities being searchable in the 'Activites' page of the Analytics console, then this is a defect for Worklight 6.2.

I can confirm that all of the above issues are fixed for the next release of Worklight (whether its through code fixes or documentation). If you need some of these fixes backported to a previous release of Worklight, please open a PMR so that we can begin that process.

I would suggest passing in the stringify property as true.

var obj = {name : "bob", age : 100};

WL.Logger.config({stringify : true, pkg: 'myActivity'});
WL.Logger.debug(obj);

If you want a pretty format you could pass in the pretty property

WL.Logger.config({stringify : true, pretty : true, pkg: 'myActivity'});
WL.Logger.debug(obj);

Hope this helps.

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