[ros-diffs] [gedmurphy] 34029: Only call DbgPrintEx once for each debug macro. This stops trace info from being split over 2 lines in some tools, like DebugView.

gedmurphy at svn.reactos.org gedmurphy at svn.reactos.org
Thu Jun 19 22:42:58 CEST 2008


Author: gedmurphy
Date: Thu Jun 19 15:42:57 2008
New Revision: 34029

URL: http://svn.reactos.org/svn/reactos?rev=34029&view=rev
Log:
Only call DbgPrintEx once for each debug macro. This stops trace info from being split over 2 lines in some tools, like DebugView.

Modified:
    trunk/reactos/include/reactos/debug.h

Modified: trunk/reactos/include/reactos/debug.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/debug.h?rev=34029&r1=34028&r2=34029&view=diff
==============================================================================
--- trunk/reactos/include/reactos/debug.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/debug.h [iso-8859-1] Thu Jun 19 15:42:57 2008
@@ -109,14 +109,10 @@
 
     #define UNIMPLEMENTED       DbgPrint("WARNING:  %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
 
-    #define ERR_(ch, ...)       DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
-                                DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, __VA_ARGS__)
-    #define WARN_(ch, ...)      DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
-                                DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, __VA_ARGS__)
-    #define TRACE_(ch, ...)     DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
-                                DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, __VA_ARGS__)
-    #define INFO_(ch, ...)      DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, "(%s:%d) ", __FILE__, __LINE__), \
-                                DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, __VA_ARGS__)
+    #define ERR_(ch, fmt, ...)    DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_ERROR_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, __VA_ARGS__)
+    #define WARN_(ch, fmt, ...)   DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_WARNING_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, __VA_ARGS__)
+    #define TRACE_(ch, fmt, ...)  DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_TRACE_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, __VA_ARGS__)
+    #define INFO_(ch, fmt, ...)   DbgPrintEx(DPFLTR_##ch##_ID, DPFLTR_INFO_LEVEL, "(%s:%d) " fmt, __FILE__, __LINE__, __VA_ARGS__)
 #else
 
     /* On non-debug builds, we never show these */



More information about the Ros-diffs mailing list