Reputation: 298
With Worklight 6.2 developer edition, I use the following 4 statements in an adapter, however in server.xml there is only a single "logging" property; as consequence, the 'Worklight Deployment Server' console cannot capture all of these messages:
WL.Logger.info("i");
WL.Logger.warn("w");
WL.Logger.error("e");
WL.Logger.debug("d");
sample line in server.xml:
<logging consoleLogLevel="INFO" copySystemStreams="true"/>
i.e.
set level to 'INFO', it captures 3 messages: i, w, e.
set level to 'AUDIT', it captures 2 messages: w, e.
set level to 'WARNING', it captures 2 messages: w, e.
set level to 'ERROR', it captures 1 messages: e.
What I'd like to know is how can I capture messages given by WL.Logger.debug()
or must I change it to other methods (i.e. warn(), info())?
Upvotes: 0
Views: 736
Reputation: 44516
See this question: IBM Worklight 6.0 - How to enable/view WL.Logger.debug in adapters?
The Websphere Liberty profile console does not support debug
level.
However, you can still use it and in order to see the log line, you'll need to enable trace in Liberty and then find the trace.log file, where you will see the debug-level log line. For more information you can read the following documentation topic: Liberty profile - logging and trace.
Steps you can follow to achieve the above:
You can use WL.Logger.debug
and edit server.xml
to view the log in the trace.log
file
<logging traceSpecification="com.worklight.*=debug=enabled"/>
<eclipseWorkspace>\WorklightServerConfig\servers\worklight\logs\trace.log
Be sure to re-deploy the adapter before attempting to view the logs.
Upvotes: 1