Continued development of AuthenticationToken Validation Service.
This commit is contained in:
@@ -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; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user