Worklight 5.0.6.1 - System.out.println() logging from Worklight adapter is not working

半腔热情 提交于 2019-11-28 13:06:13

See if the following IBM Worklight Information Center articles help you out:

logger.info or logger.warning will be printed to the Eclipse Worklight console.
System.Out.println() is dependent on the application server you are using and is not in the control of Worklight.

This can be seen in action in the Using Java in Adapters training module from the IBM Worklight Getting Started page.

Logger l = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); 
l.warning("Server Java: getAirportData");  

worked fine in the Eclipse WL console.

However:

l.info("Server Java: getAirportData");

did not work. Probably due to WL logging settings.

In Mac, when I had my sample app running, I went to the "Servers" tab, expanded the Worklight Development Server. Then I right-clicked on "Server Configuration" and selected "Open". That opens your server.xml file.

There is a line like this - logging consoleLogLevel=..

You can set that consoleLogLevel to INFO or DEBUG or whatever you like to see what happens in your adapter.

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