LANSA Mobile App

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

LANSA Mobile App

Post by soa »

I have turned on the Developer Console and expected the sys_web.console.log entries to be there but it remains blank. What do I have to do to see entries on it?
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: LANSA Mobile App

Post by MarkD »

If you are going to run sometimes in the browser by itself, and sometimes in the LANSA Mobile container it might be useful to abstract some things like tracing slightly.

The attached zip file contains a system services manager singleton named vDemo_SystemManager where typically all shared application code and behaviour would go. It has a method LogtoConsole.

So any code that wants to logs things would declare it like this:

Code: Select all

Define_Com Class(#vDemo_SystemManager) Name(#MySystemManager) Scope(*APPLICATION)
And then performing logging like this:

Code: Select all

#MySystemManager.LogtoConsole Text("Test a single line")

In the attached example are reusable part vDemo_SystemManager, widget vDemo_LongRangeTrace and a demo web page vDemo_Test trace.
If you run vDemo_TestTrace in a browser it should log to #Sys_Web.cosole.log.
If you run it in LANSA mobile it should log to LONGRANGE.console.log.
Capture4.PNG
Capture4.PNG (10.68 KiB) Viewed 6185 times
Attachments
QuickExport_Tracing.zip
(16.61 KiB) Downloaded 1030 times
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: LANSA Mobile App

Post by soa »

Thanks Mark. That worked fine.
Post Reply