Logging errors

To log an error in the Blueworx Voice Response error log, use the CA_Log_Error() subroutine. For example:

int RC;
int RC2;
char error_parm1[] = “Pizza ordering application custom server” ;
#define NBYTES_2 72
char error_parm2[ NBYTES_2 ] ;
...
/* an error has occurred, report it */
sprintf(error_parm2, “Error, rc%d, pid=%d in '%s' at line %d\n”,
        RC, getpid(), __FILE__, __LINE__ ) ;
RC2 = CA_Log_Error( ERR_CA_USER_DEFINED_YELLOW ,
                    error_parm1  ,
                    error_parm2  ,
                      NULL );
/* last parameter to CA_Log_Error() must be NULL */