Continued development of AuthenticationToken Validation Service.

This commit is contained in:
Juan Carlos Luciani
2006-09-07 23:33:33 +00:00
parent 307ed2444c
commit 6ab8fe3080
14 changed files with 386 additions and 131 deletions

View File

@@ -68,28 +68,19 @@ extern pthread_mutex_t interlockedMutex;
// DbgTrace macro define
//
#define MAX_FORMAT_STRING_LEN 1024
#define DbgTrace(LEVEL, X, Y) { \
if (LEVEL == 0) { \
char *pFormatString = new char[MAX_FORMAT_STRING_LEN]; \
if (pFormatString) { \
snprintf(pFormatString, MAX_FORMAT_STRING_LEN, X, Y); \
if (UseSyslog) \
syslog(LOG_USER | LOG_INFO, "%s -%s", pAppName, pFormatString); \
else \
fprintf(stderr, "%s -%s", pAppName, pFormatString); \
delete[] pFormatString; \
} \
} else if (DebugLevel >= LEVEL) { \
char *pFormatString = new char[MAX_FORMAT_STRING_LEN]; \
if (pFormatString) { \
snprintf(pFormatString, MAX_FORMAT_STRING_LEN, X, Y); \
if (UseSyslog) \
syslog(LOG_USER | LOG_DEBUG, "%s -%s", pAppName, pFormatString); \
else \
fprintf(stderr, "%s -%s", pAppName, pFormatString); \
delete[] pFormatString; \
} \
} \
#define DbgTrace(LEVEL, X, Y) { \
if (LEVEL == 0 || DebugLevel >= LEVEL) { \
if (UseSyslog) \
syslog(LOG_USER | LOG_INFO, X, Y); \
else { \
char *pFormatString = new char[MAX_FORMAT_STRING_LEN]; \
if (pFormatString) { \
snprintf(pFormatString, MAX_FORMAT_STRING_LEN, X, Y); \
fprintf(stderr, "%s -%s", pAppName, pFormatString); \
delete[] pFormatString; \
} \
} \
} \
}
//