Use cciUserTraceW to write a message from a message catalog (with inserts) to user trace. A message is also written to service trace, if service trace is active.
The message written to user trace has the following format:
<date-time stamp> <threadNumber> UserTrace <Message text with inserts> <Message Explanation>
void cciUserTraceW(
int* returnCode,
CciObject* object,
const CciChar* messageSource,
int messageNumber,
const CciChar* traceText,
...
);
To use the current integration node message catalog, specify BIPmsgs on all operating systems. Alternatively, you can create your own message catalog.
When trace is formatted, a message from the NLS version of this catalog is written.
The locale used is that of the environment where the trace is formatted. You can run the integration node on one operating system, read the log on that operating system, then format the log on a different operating system. For example, if the integration node is running on Linux, UNIX, or z/OS but no .cat file is available, you could read the log, then transfer it to Windows where the log can be formatted by using the .properties file.
If this parameter is NULL, the effect is the same as specifying an empty string. That is, all other information is written to the log, and the catalog field has an empty string value. Therefore, the log formatter cannot find the message source and fails to format this entry.
The last argument in this list must be (CciChar*)0.
None. If an error occurs, the returnCode parameter indicates the reason for the error.
const CciChar* myMessageSource=CciString("SwitchMSG",BIP_DEF_COMP_CCSID);
const CciChar* text = CciString("propagating to add terminal",
BIP_DEF_COMP_CCSID);
const CciChar* insert = CciString("add", BIP_DEF_COMP_CCSID);
CciNode* thisNode = ((NODE_CONTEXT_ST*)context)->nodeObject;
int rc = CCI_SUCCESS;
cciUserTrace(&rc,
(CciObject*)thisNode,
myMessageSource,
1,
text,
insert,
(CciChar*)0);
checkRC(rc);