Changed DbgPrint macro to use syslog() rather than printf().
This commit is contained in:
		| @@ -6,7 +6,7 @@ test -z "$srcdir" && srcdir=. | |||||||
|  |  | ||||||
| ORIGDIR=`pwd` | ORIGDIR=`pwd` | ||||||
| cd $srcdir | cd $srcdir | ||||||
| PROJECT=CASA_auth_token_native | PROJECT=CASA_auth_token_client | ||||||
| TEST_TYPE=-f | TEST_TYPE=-f | ||||||
| FILE=configure.in | FILE=configure.in | ||||||
|  |  | ||||||
|   | |||||||
| @@ -57,22 +57,22 @@ | |||||||
| // | // | ||||||
| // DbgTrace macro define | // DbgTrace macro define | ||||||
| // | // | ||||||
| #define DbgTrace(LEVEL, X, Y) {                          \ | /*#define DbgTrace(LEVEL, X, Y) {                          \ | ||||||
| char printBuff[256];                                     \ | char printBuff[256];                                     \ | ||||||
|    if (LEVEL == 0 || DebugLevel >= LEVEL)                \ |    if (LEVEL == 0 || DebugLevel >= LEVEL)                \ | ||||||
|    {                                                     \ |    {                                                     \ | ||||||
|       _snprintf(printBuff, sizeof(printBuff), X, Y);     \ |       _snprintf(printBuff, sizeof(printBuff), X, Y);     \ | ||||||
|       fprintf(stderr, "CASA_AuthToken %s", printBuff);   \ |       fprintf(stderr, "CASA_AuthToken %s", printBuff);   \ | ||||||
|    }                                                     \ |    }                                                     \ | ||||||
| } | }*/ | ||||||
| /*#define DbgTrace(LEVEL, X, Y) {                                                        \ | #define DbgTrace(LEVEL, X, Y) {                                                        \ | ||||||
|    if (LEVEL == 0 || DebugLevel >= LEVEL)                                              \ |    if (LEVEL == 0 || DebugLevel >= LEVEL)                                              \ | ||||||
|    {                                                                                   \ |    {                                                                                   \ | ||||||
|       openlog("CASA_AuthToken", LOG_CONS | LOG_NOWAIT | LOG_ODELAY, LOG_USER);         \ |       openlog("CASA_AuthToken", LOG_CONS | LOG_NOWAIT | LOG_ODELAY, LOG_USER);         \ | ||||||
|       syslog(LOG_USER | LOG_INFO, X, Y);                                               \ |       syslog(LOG_USER | LOG_INFO, X, Y);                                               \ | ||||||
|       closelog();                                                                      \ |       closelog();                                                                      \ | ||||||
|    }                                                                                   \ |    }                                                                                   \ | ||||||
| }*/ | } | ||||||
|  |  | ||||||
|  |  | ||||||
| // | // | ||||||
|   | |||||||
| @@ -52,22 +52,22 @@ | |||||||
| // | // | ||||||
| // DbgTrace macro define | // DbgTrace macro define | ||||||
| // | // | ||||||
| #define DbgTrace(LEVEL, X, Y) {                          \ | /*#define DbgTrace(LEVEL, X, Y) {                          \ | ||||||
| char printBuff[256];                                     \ | char printBuff[256];                                     \ | ||||||
|    if (LEVEL == 0 || DebugLevel >= LEVEL)                \ |    if (LEVEL == 0 || DebugLevel >= LEVEL)                \ | ||||||
|    {                                                     \ |    {                                                     \ | ||||||
|       _snprintf(printBuff, sizeof(printBuff), X, Y);     \ |       _snprintf(printBuff, sizeof(printBuff), X, Y);     \ | ||||||
|       fprintf(stderr, "CASA_Krb5Mech %s", printBuff);    \ |       fprintf(stderr, "CASA_Krb5Mech %s", printBuff);    \ | ||||||
|    }                                                     \ |    }                                                     \ | ||||||
| } | }*/ | ||||||
| /*#define DbgTrace(LEVEL, X, Y) {                                                        \ | #define DbgTrace(LEVEL, X, Y) {                                                        \ | ||||||
|    if (LEVEL == 0 || DebugLevel >= LEVEL)                                              \ |    if (LEVEL == 0 || DebugLevel >= LEVEL)                                              \ | ||||||
|    {                                                                                   \ |    {                                                                                   \ | ||||||
|       openlog("CASA_Krb5Mech", LOG_CONS | LOG_NOWAIT | LOG_ODELAY, LOG_USER);          \ |       openlog("CASA_Krb5Mech", LOG_CONS | LOG_NOWAIT | LOG_ODELAY, LOG_USER);          \ | ||||||
|       syslog(LOG_USER | LOG_INFO, X, Y);                                               \ |       syslog(LOG_USER | LOG_INFO, X, Y);                                               \ | ||||||
|       closelog();                                                                      \ |       closelog();                                                                      \ | ||||||
|    }                                                                                   \ |    }                                                                                   \ | ||||||
| }*/ | } | ||||||
|  |  | ||||||
|  |  | ||||||
| // | // | ||||||
|   | |||||||
| @@ -50,22 +50,22 @@ | |||||||
| // | // | ||||||
| // DbgTrace macro define | // DbgTrace macro define | ||||||
| // | // | ||||||
| #define DbgTrace(LEVEL, X, Y) {                          \ | /*#define DbgTrace(LEVEL, X, Y) {                          \ | ||||||
| char printBuff[256];                                     \ | char printBuff[256];                                     \ | ||||||
|    if (LEVEL == 0 || DebugLevel >= LEVEL)                \ |    if (LEVEL == 0 || DebugLevel >= LEVEL)                \ | ||||||
|    {                                                     \ |    {                                                     \ | ||||||
|       _snprintf(printBuff, sizeof(printBuff), X, Y);     \ |       _snprintf(printBuff, sizeof(printBuff), X, Y);     \ | ||||||
|       fprintf(stderr, "CASA_PwMech %s", printBuff);      \ |       fprintf(stderr, "CASA_PwMech %s", printBuff);      \ | ||||||
|    }                                                     \ |    }                                                     \ | ||||||
| } | }*/ | ||||||
| /*#define DbgTrace(LEVEL, X, Y) {                                                        \ | #define DbgTrace(LEVEL, X, Y) {                                                        \ | ||||||
|    if (LEVEL == 0 || DebugLevel >= LEVEL)                                              \ |    if (LEVEL == 0 || DebugLevel >= LEVEL)                                              \ | ||||||
|    {                                                                                   \ |    {                                                                                   \ | ||||||
|       openlog("CASA_PwMech", LOG_CONS | LOG_NOWAIT | LOG_ODELAY, LOG_USER);            \ |       openlog("CASA_PwMech", LOG_CONS | LOG_NOWAIT | LOG_ODELAY, LOG_USER);            \ | ||||||
|       syslog(LOG_USER | LOG_INFO, X, Y);                                               \ |       syslog(LOG_USER | LOG_INFO, X, Y);                                               \ | ||||||
|       closelog();                                                                      \ |       closelog();                                                                      \ | ||||||
|    }                                                                                   \ |    }                                                                                   \ | ||||||
| }*/ | } | ||||||
|  |  | ||||||
|  |  | ||||||
| // | // | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user