im writing the logging class at the moment. Logger works with streams and also prints the object that is currently being written. Here is the macro:
#define OBJLOG(DL, what) DL <= this->Logger->getDebugLevel() ? *this->Logger << DL << "[" << this->Name << "]: "<< what << std::endl : this->Logger->doNothing();
Pseudocode Varient for a better overview:
#define OBJLOG(debuglevel, what) debuglevel <= logger.debuglevel ? logger.log(what) : logger.doNothing()
Is there a way around the doNothing call, how to do nothing at all? Thanks in advance.
source
share