diff include/freeDiameter/libfdproto.h @ 1237:b255ba44f59c

Add an option DEBUG_WITHOUT_META to strip some information from the log prefix
author Sebastien Decugis <sdecugis@freediameter.net>
date Sat, 02 Nov 2013 22:27:34 +0800
parents e72c9dad62ac
children b25ca6134bdc
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h	Sat Sep 14 12:56:05 2013 +0200
+++ b/include/freeDiameter/libfdproto.h	Sat Nov 02 22:27:34 2013 +0800
@@ -295,13 +295,13 @@
 
 
 /* In DEBUG mode, we add meta-information along each trace. This makes multi-threading problems easier to debug. */
-#ifdef DEBUG
+#if (defined(DEBUG) && !defined(DEBUG_WITHOUT_META))
 # define STD_TRACE_FMT_STRING "pid:%s in %s@%s:%d: "
 # define STD_TRACE_FMT_ARGS   , ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"), __PRETTY_FUNCTION__, __STRIPPED_FILE__, __LINE__
-#else /* DEBUG */
+#else /* DEBUG && !DEBUG_WITHOUT_META */
 # define STD_TRACE_FMT_STRING ""
 # define STD_TRACE_FMT_ARGS
-#endif /* DEBUG */
+#endif /* DEBUG && !DEBUG_WITHOUT_META */
 
 /*************************
   The general debug macro
"Welcome to our mercurial repository"