diff options
Diffstat (limited to 'gnuradio-core/src/lib/runtime')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_log.h | 49 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_log.i | 4 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/qa_gr_log.cc | 2 |
3 files changed, 28 insertions, 27 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_log.h b/gnuradio-core/src/lib/runtime/gr_log.h index 1a52d2aef6..4f718567df 100644 --- a/gnuradio-core/src/lib/runtime/gr_log.h +++ b/gnuradio-core/src/lib/runtime/gr_log.h @@ -37,29 +37,7 @@ * */ -//If DISABLE_GR_LOG set then clear all logging macros -#ifdef DISABLE_GR_LOG - -#define GR_CONFIG_LOGGER(config) -#define GR_LOG_GETLOGGER(logger, name) -#define GR_TRACE(name, msg) -#define GR_DEBUG(name, msg) -#define GR_INFO(name, msg) -#define GR_WARN(name, msg) -#define GR_ERROR(name, msg) -#define GR_FATAL(name, msg) -#define GR_ERRORIF(name, cond, msg) -#define GR_ASSERT(name, cond, msg) -#define GR_LOG_TRACE(logger, msg) -#define GR_LOG_DEBUG(logger, msg) -#define GR_LOG_INFO(logger, msg) -#define GR_LOG_WARN(logger, msg) -#define GR_LOG_ERROR(logger, msg) -#define GR_LOG_FATAL(logger, msg) -#define GR_LOG_ERRORIF(logger, cond, msg) -#define GR_LOG_ASSERT(logger, cond, msg) - -#else +#ifdef ENABLE_GR_LOG #include <stdio.h> #include <string> @@ -262,5 +240,28 @@ class gr_log void log_assert(LoggerPtr logger,bool cond,std::string msg){GR_LOG_ASSERT(logger,cond,msg);}; }; -#endif /* DISABLE_GR_LOG */ + +//If ENABLE_GR_LOG not set then clear all logging macros +#else + +#define GR_CONFIG_LOGGER(config) +#define GR_LOG_GETLOGGER(logger, name) +#define GR_TRACE(name, msg) +#define GR_DEBUG(name, msg) +#define GR_INFO(name, msg) +#define GR_WARN(name, msg) +#define GR_ERROR(name, msg) +#define GR_FATAL(name, msg) +#define GR_ERRORIF(name, cond, msg) +#define GR_ASSERT(name, cond, msg) +#define GR_LOG_TRACE(logger, msg) +#define GR_LOG_DEBUG(logger, msg) +#define GR_LOG_INFO(logger, msg) +#define GR_LOG_WARN(logger, msg) +#define GR_LOG_ERROR(logger, msg) +#define GR_LOG_FATAL(logger, msg) +#define GR_LOG_ERRORIF(logger, cond, msg) +#define GR_LOG_ASSERT(logger, cond, msg) + +#endif /* ENABLE_GR_LOG */ #endif /* INCLUDED_GR_LOG_H */ diff --git a/gnuradio-core/src/lib/runtime/gr_log.i b/gnuradio-core/src/lib/runtime/gr_log.i index d56edd4f37..e539c5528b 100644 --- a/gnuradio-core/src/lib/runtime/gr_log.i +++ b/gnuradio-core/src/lib/runtime/gr_log.i @@ -40,7 +40,7 @@ //----------------------------------- -#ifndef DISABLE_GR_LOG +#ifdef ENABLE_GR_LOG %{ // The .h files @@ -82,4 +82,4 @@ public: void log_assert(LoggerPtr logger,bool cond,std::string msg); }; -#endif +#endif /* ENABLE_GR_LOG */ diff --git a/gnuradio-core/src/lib/runtime/qa_gr_log.cc b/gnuradio-core/src/lib/runtime/qa_gr_log.cc index d8d0914992..a973408028 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_log.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_log.cc @@ -35,7 +35,7 @@ void qa_gr_log::t1() { -#ifndef DISABLE_GR_LOG +#ifdef ENABLE_GR_LOG // This doesn't really test anything, more just // making sure nothing's gone horribly wrong. GR_LOG_GETLOGGER(LOG,"errLoggerRoot"); |