changeset 1117:caae38f15dfe

Refine mapping of the old levels for traces
author Sebastien Decugis <sdecugis@freediameter.net>
date Mon, 13 May 2013 19:28:17 +0800
parents 5da2ea1585a1
children 5b4dddbfccb3
files include/freeDiameter/libfdproto.h
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h	Mon May 13 19:18:09 2013 +0800
+++ b/include/freeDiameter/libfdproto.h	Mon May 13 19:28:17 2013 +0800
@@ -484,9 +484,10 @@
 /* old macro for traces. To be replaced by appropriate LOG_* macros. */
 # define TRACE_DEBUG(oldlevel, format,args... ) {					\
 		if (TRACE_BOOL(oldlevel)) {						\
-			if      (oldlevel == NONE) { LOG_E(format,##args); }		\
-			else if (oldlevel == INFO) { LOG_N(format,##args); }		\
-			else                       { LOG_D(format,##args); }		\
+			if      (oldlevel <= NONE) { LOG_E(format,##args); }		\
+			else if (oldlevel <= INFO) { LOG_N(format,##args); }		\
+			else if (oldlevel <= FULL) { LOG_D(format,##args); }		\
+			else                       { LOG_A(format,##args); }		\
 }		}
 
 /* the following macro must be replaced with LOG_E or LOG_F */
"Welcome to our mercurial repository"