cciLogW logs an error, warning, or informational event. The event is logged by the broker interface and uses the specified arguments as log data.
void cciLogW( int* returnCode, CCI_LOG_TYPE type, const char* file, int line, const char* function, const CciChar* messageSource, int messageNumber, const CciChar* traceText, ... );
To
use the current broker message catalog, specify BIPv600 on
all operating systems. Alternatively, you can create your own message catalog.
The last argument in this list must be (CciChar*)0.
None. If an error occurs, the returnCode parameter indicates the reason for the error.
void logSomethingWithBroker(CciChar* helpfulText,
char* file,
int line,
char* func
){
int rc = CCI_SUCCESS;
/* set up the message catalog name */
const CciChar* catalog = CciString("BIPv600", BIP_DEF_COMP_CCSID);
cciLogW(&rc,
CCI_LOG_INFORMATION
file, line, func,
catalog, BIP2111,
helpfulText,
helpfulText,
(CciChar*)0
);
if(CCI_SUCCESS != rc){
const CciChar* message = CciString("Failed to log message",
BIP_DEF_COMP_CCSID);
raiseExceptionWithBroker(message,
__FILE__,
__LINE__,
"logSomethingWithBroker");
}
}