1665 char message[MSG_DESCRIPTION_SIZE];
1671 type[
sprintf(type,
"INFO")] = 0;
1672 eventType = MSG_INFO;
1675 type[
sprintf(type,
"WARNING")] = 0;
1676 eventType = MSG_WARNING;
1679 type[
sprintf(type,
"ERROR")] = 0;
1680 eventType = MSG_ERROR;
1683 type[
sprintf(type,
"FATAL")] = 0;
1684 eventType = MSG_ERROR;
1687 type[
sprintf(type,
"UNKNOWN")] = 0;
1688 eventType = MSG_WARNING;
1694 printf(
"DIM: [%s - %d] - %d: %s.\n", type, severity, error_code, msg);
1699 if ((state == RUNNING) || (state == ERROR_STATE)) {
1702 length = strlen(message);
1703 strncpy((message + length), msg, (MSG_DESCRIPTION_SIZE - length - 1));
1704 message[MSG_DESCRIPTION_SIZE - 1] = 0;
static MessageStruct message
char * mapDimErrorCodes(int errorCode)
void createLogMessage(unsigned int type, char *description, char *origin)
sprintf(name1,"NewService%d", i)