![IBM WebSphere Adapter Toolkit Скачать руководство пользователя страница 186](http://html1.mh-extra.com/html/ibm/websphere-adapter-toolkit/websphere-adapter-toolkit_user-manual_608688186.webp)
translated text. Values that are language-independent, such as key values or object
names, are appropriate as log message parameters.
Similarly to trace messages, parameters in a log message can contain data from the
customer’s EIS. Because a customer might be unwilling to send a log file that
contains sensitive data to a support specialist for analysis, you can optionally use
the logConfidential method of the
LogUtils
class to generate confidential log
messages whose EIS-specific content is replaced by a string of XXX’s when the
customer enables the HideConfidentialTrace property. Like the log method, the
logConfidential method accepts parameters similar to that of the trace file. Instead
of providing a hard-coded message, however, provide a key to the message from
the log message file. The logConfidential method can also take optional parameters
if there are values to be substituted in the message.
void logConfidential
(Level l, int bundleType, String classname, String method, String msgKey, Object[] params)
void logConfidential
(Level l, String classname, String method, String msgKey, CBEEngineData engine)
void logConfidential
(Level l, String classname, String method, String msgKey, Object[] params)
void logConfidential
(Level l, String classname, String method,String msgKey, Object[] params, CBEEngineData engineData)
In an outbound or inbound scenario, to get the
LogUtils
object instance, in
WebSphere Integration Developer, Right click on the method and select the
following option:
v
Source
→
Insert Log Statement
.
Example of log message for the outbound scenario
public HelloWorldConnectionFactory(ConnectionManager connMgr, WBIManagedConnectionFactory mcf) {
super(connMgr, mcf);
getLogUtils().log(Level.INFO, LogUtilConstants.ADAPTER_RBUNDLE,
"com.ibm.helloworld.outbound.HelloWorldConnectionFactory",
"HelloWorldConnectionFactory()", "10");
}
Example of log message for the inbound scenario
public javax.resource.cci.Record getRecordForEvent(com.ibm.j2ca.extension.eventmanagement.Event event)
throws javax.resource.ResourceException,
javax.resource.spi.CommException {
logger.log(Level.INFO, LogUtilConstants.ADAPTER_RBUNDLE,
"com.ibm.helloworld.inbound.HelloWorldEventStoreWithXid",
"getRecordForEvent()", "10");
return null;
}
Example of log message for the outbound scenario with confidential tracing
property enabled
public HelloWorldConnectionFactory(ConnectionManager connMgr, WBIManagedConnectionFactory mcf) {
super(connMgr, mcf);
getLogUtils().logConfidential(Level.INFO,
LogUtilConstants.ADAPTER_RBUNDLE,
"com.ibm.helloworld.outbound.HelloWorldConnectionFactory",
"HelloWorldConnectionFactory()", "10", new Object[] { "str" });
}
180
WebSphere Adapters: WebSphere Adapter Toolkit User Guide
Содержание WebSphere Adapter Toolkit
Страница 1: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...
Страница 2: ......
Страница 3: ...WebSphere Adapters WebSphere Adapter Toolkit User Guide Version 6 Release 2 Version 6 Release 2...
Страница 6: ...iv WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 211: ...7 Start UTC using the Run universal test client option WebSphere Adapter development overview 205...
Страница 220: ...214 WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 224: ...218 WebSphere Adapters WebSphere Adapter Toolkit User Guide...
Страница 225: ......
Страница 226: ...Printed in USA...