]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
staffan :
authorvbd <vbd>
Thu, 23 Aug 2007 14:21:27 +0000 (14:21 +0000)
committervbd <vbd>
Thu, 23 Aug 2007 14:21:27 +0000 (14:21 +0000)
added some simple logging macros

src/INTERP_KERNEL/Log.hxx [new file with mode: 0644]

diff --git a/src/INTERP_KERNEL/Log.hxx b/src/INTERP_KERNEL/Log.hxx
new file mode 100644 (file)
index 0000000..c3adaf8
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef _LOG_H_
+#define _LOG_H_
+
+/* Simple pre-processor logging utility.
+ * Replaces LOG( x ) with "if(x <= LOG_LEVEL) std::cout" when logging is active (LOG_ACTIVE defined)
+ * x is the level at which the message should be logged. 
+ *
+ *
+ *
+ */
+
+
+
+#define LOG_ACTIVE
+
+#ifdef LOG_ACTIVE
+
+#include <iostream>
+
+#define LOG_LEVEL 1
+
+#define LOG(x, msg) if(x <= LOG_LEVEL) std::cout << msg << std::endl; 
+
+#else
+
+#define LOG(x, msg)
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+#endif