Page 1 of 1

LANSA Mobile App

Posted: Thu Oct 27, 2016 11:27 am
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?

Re: LANSA Mobile App

Posted: Thu Oct 27, 2016 2:53 pm
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 6188 times

Re: LANSA Mobile App

Posted: Thu Oct 27, 2016 4:36 pm
by soa
Thanks Mark. That worked fine.