Mercurial > hg > freeDiameter
changeset 735:da8bfb070900
Fix the logic of local + global debug level
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Wed, 02 Mar 2011 14:37:19 +0900 |
parents | f065e9dfdb98 |
children | 9af507b1bd23 |
files | include/freeDiameter/libfdproto.h libfdproto/log.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h Tue Mar 01 10:48:30 2011 +0900 +++ b/include/freeDiameter/libfdproto.h Wed Mar 02 14:37:19 2011 +0900 @@ -172,15 +172,15 @@ #define FCTS 6 /* Display entry parameters of most functions */ #define CALL 9 /* Display calls to most functions (with CHECK macros) */ -/* Default level is INFO */ +/* Increment the debug level for a file at compilation time by defining -DTRACE_LEVEL=FULL for example. */ #ifndef TRACE_LEVEL -#define TRACE_LEVEL INFO +#define TRACE_LEVEL NONE #endif /* TRACE_LEVEL */ /* The level of the file being compiled. */ static int local_debug_level = TRACE_LEVEL; -/* A global level, changed by configuration or cmd line for example. default is 0. */ +/* A global level, changed by configuration or cmd line for example. Default is INFO (in libfdproto/log.c). */ extern int fd_g_debug_lvl; /* Some portability code to get nice function name in __PRETTY_FUNCTION__ */
--- a/libfdproto/log.c Tue Mar 01 10:48:30 2011 +0900 +++ b/libfdproto/log.c Wed Mar 02 14:37:19 2011 +0900 @@ -39,7 +39,7 @@ pthread_mutex_t fd_log_lock = PTHREAD_MUTEX_INITIALIZER; pthread_key_t fd_log_thname; -int fd_g_debug_lvl = 0; +int fd_g_debug_lvl = INFO; /* These may be used to pass specific debug requests via the command-line parameters */ char * fd_debug_one_function = NULL;