From: vbd Date: Thu, 23 Aug 2007 14:21:27 +0000 (+0000) Subject: staffan : X-Git-Tag: trio_trio_coupling~66 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=69104a211133f451e1df772a86a7665f975e32a9;p=tools%2Fmedcoupling.git staffan : added some simple logging macros --- diff --git a/src/INTERP_KERNEL/Log.hxx b/src/INTERP_KERNEL/Log.hxx new file mode 100644 index 000000000..c3adaf883 --- /dev/null +++ b/src/INTERP_KERNEL/Log.hxx @@ -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 + +#define LOG_LEVEL 1 + +#define LOG(x, msg) if(x <= LOG_LEVEL) std::cout << msg << std::endl; + +#else + +#define LOG(x, msg) + +#endif + + + + + + + + + + + +#endif