]> AND Private Git Repository - loba.git/commitdiff
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add colors to trace categories.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 29 Mar 2011 06:51:50 +0000 (08:51 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 30 Mar 2011 16:59:37 +0000 (18:59 +0200)
I am still unable to exploit those traces...

main.cpp
tracing.h

index 9a6b5b27b9139b8ca51cc9596f51d080f68d77d3..102122dc7eab8012aa056eab515f351ad496707a 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -236,9 +236,9 @@ int main(int argc, char* argv[])
         }
 
         // Register tracing categories
-        TRACE_category(TRACE_CAT_COMP);
-        TRACE_category(TRACE_CAT_CTRL);
-        TRACE_category(TRACE_CAT_DATA);
+        TRACE_category_with_color(TRACE_CAT_COMP, TRACE_COLOR_COMP);
+        TRACE_category_with_color(TRACE_CAT_CTRL, TRACE_COLOR_CTRL);
+        TRACE_category_with_color(TRACE_CAT_DATA, TRACE_COLOR_DATA);
 
         exit_status = EXIT_FAILURE_SIMU; // =====
 
index f2834652b973574cca59ebdaa24b96faf7bb2245..57b8f7f353638a1325c4af7c2c7dcef9a9f5741c 100644 (file)
--- a/tracing.h
+++ b/tracing.h
@@ -5,6 +5,10 @@
 #define TRACE_CAT_CTRL "ctrl_mesg"
 #define TRACE_CAT_DATA "data_mesg"
 
+#define TRACE_COLOR_COMP "1 0 0"        // red
+#define TRACE_COLOR_CTRL "0 1 0"        // green
+#define TRACE_COLOR_DATA "0 0 1"        // blue
+
 #endif // !TRACING_H
 
 // Local variables: