Worklight 5.0.6.1 - 从Worklight适配器记录的System.out.println()不起作用 [英] Worklight 5.0.6.1 - System.out.println() logging from Worklight adapter is not working

查看:139
本文介绍了Worklight 5.0.6.1 - 从Worklight适配器记录的System.out.println()不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Worklight 5.0.6.1,当从我的适配器调用Java代码时,我在 workspace\WorklightServetrHome\project\logs 日志文件。

I've installed Worklight 5.0.6.1 and when invoking Java code from my adapter I don't see the log output in the workspace\WorklightServetrHome\project\logs log files.

我正在使用System.out.println()。有什么建议为什么这在Worklight的早期版本中成功运行,并且在v5.0.6.1中不起作用?什么属性设置允许Worklight中需要设置Java代码的系统输出?

I'm using System.out.println(). Any advice why this worked successfully in previous releases of Worklight, and is not working in v5.0.6.1? What the property settings to allow System output from Java code in Worklight that need to be set?

FYI:认为它可能是一个糟糕的安装我再次安装,并得到相同的结果。 System.out.println()调用之前和之后的代码正确执行,所以我确定该语句正在执行。

FYI: Thinking it might be a bad install I re-installed a second time, and with the same result. The code prior to, and after the System.out.println() calls is executing correctly so I'm sure the statement is being executed.

推荐答案

查看以下 IBM Worklight信息中心文章帮助你:

  • Logging and monitoring mechanisms
  • Enabling trace for adapters in an Eclipse-hosted server
  • Methods WL.Logger.debug, error, and log (logging methods for server-side code)

在JavaScript中,您可以使用 WL.Logger

In JavaScript you can use WL.Logger

logger.info logger.warning 将打印到Eclipse Worklight控制台。

System.Out.println()取决于您使用的应用程序服务器,而不是在Worklight的控制中。

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.

这可以在在适配器培训模块中使用Java 来自 IBM Worklight入门页面

这篇关于Worklight 5.0.6.1 - 从Worklight适配器记录的System.out.println()不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆