X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Flog.hh;h=a32daadd8b13b79cc5d8c83dce762d802c67c856;hp=2679b37306694763e1b0886a904a660f549f5fff;hb=51069fee9139ab8d14ecc80dffbe5deecb73d9e0;hpb=831f04d4bc19a390415ac0bbac4331c7a65509bc diff --git a/src/moof/log.hh b/src/moof/log.hh index 2679b37..a32daad 100644 --- a/src/moof/log.hh +++ b/src/moof/log.hh @@ -23,21 +23,6 @@ #include -#undef ASSERT -#if NDEBUG -#define ASSERT(X) -#else -/** - * Macro which tests an assertion and issues a log_error() and exits if the - * assertion is false. - * \param X test to perform - */ -#define ASSERT(X) if (!(X)) moof::log_error \ - << "false assertion at " << __FILE__ << ":" << __LINE__ << ", " \ - << #X, exit(1) -#endif - - namespace moof { @@ -142,7 +127,7 @@ private: template friend std::ostream& operator << (log&, const T&); - static enum level gLevel; + static enum level global_level_; enum level level_; const char* prefix_; @@ -160,7 +145,7 @@ extern class log log_info; template inline std::ostream& operator << (class log& log, const T& item) { - if (log::gLevel < log.level_) return null_log; + if (log::global_level_ < log.level_) return null_log; return moof::log << log.prefix_ << item; }