Mercurial > hg > freeDiameter
comparison include/freeDiameter/libfdproto.h @ 1295:a22d9e907d48
Make the stripped output the default. Define DEBUG_WITH_META to get longer format.
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Fri, 19 Jun 2015 00:00:10 +0800 |
parents | ab6457399be2 |
children | 3f1e79e1273e |
comparison
equal
deleted
inserted
replaced
1294:22cc3a9dd216 | 1295:a22d9e907d48 |
---|---|
295 #define __STRIPPED_FILE__ (file_bname ?: file_bname_init((char *)__FILE__)) | 295 #define __STRIPPED_FILE__ (file_bname ?: file_bname_init((char *)__FILE__)) |
296 | 296 |
297 | 297 |
298 | 298 |
299 /* In DEBUG mode, we add meta-information along each trace. This makes multi-threading problems easier to debug. */ | 299 /* In DEBUG mode, we add meta-information along each trace. This makes multi-threading problems easier to debug. */ |
300 #if (defined(DEBUG) && !defined(DEBUG_WITHOUT_META)) | 300 #if (defined(DEBUG) && defined(DEBUG_WITH_META)) |
301 # define STD_TRACE_FMT_STRING "pid:%s in %s@%s:%d: " | 301 # define STD_TRACE_FMT_STRING "pid:%s in %s@%s:%d: " |
302 # define STD_TRACE_FMT_ARGS , ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"), __PRETTY_FUNCTION__, __STRIPPED_FILE__, __LINE__ | 302 # define STD_TRACE_FMT_ARGS , ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"), __PRETTY_FUNCTION__, __STRIPPED_FILE__, __LINE__ |
303 #else /* DEBUG && !DEBUG_WITHOUT_META */ | 303 #else /* DEBUG && DEBUG_WITH_META */ |
304 # define STD_TRACE_FMT_STRING "" | 304 # define STD_TRACE_FMT_STRING "" |
305 # define STD_TRACE_FMT_ARGS | 305 # define STD_TRACE_FMT_ARGS |
306 #endif /* DEBUG && !DEBUG_WITHOUT_META */ | 306 #endif /* DEBUG && DEBUG_WITH_META */ |
307 | 307 |
308 /************************* | 308 /************************* |
309 The general debug macro | 309 The general debug macro |
310 *************************/ | 310 *************************/ |
311 #define LOG(printlevel,format,args... ) \ | 311 #define LOG(printlevel,format,args... ) \ |