21 #define GRT_DLL_EXPORTS 31 warningLog.setKey(
"[WARNING " +
classId +
"]");
34 debugLog.
setKey(
"[DEBUG]");
35 errorLog.
setKey(
"[ERROR]");
36 warningLog.setKey(
"[WARNING]");
46 errorLog <<
"copyBaseVariables(const GRTBase *base) - base pointer is NULL!" << std::endl;
51 this->debugLog = base->debugLog;
52 this->errorLog = base->errorLog;
53 this->infoLog = base->infoLog;
54 this->warningLog = base->warningLog;
60 return warningLog.getLastMessage();
72 std::string version = GRT_VERSION;
73 if( returnRevision ) version +=
" revision: " +
getGRTRevison();
81 std::string GRTBase::getClassType()
const{
102 return warningLog.setInstanceLoggingEnabled( loggingEnabled );
std::string getId() const
GRTBase * getGRTBasePointer()
bool setDebugLoggingEnabled(const bool loggingEnabled)
virtual std::string getLastMessage() const
returns the last message written by the log
static std::string getGRTRevison()
virtual bool setKey(const std::string &key)
sets the key that gets written at the start of each message, this will be written in the format 'key ...
bool setErrorLoggingEnabled(const bool loggingEnabled)
std::string getLastErrorMessage() const
std::string getLastWarningMessage() const
GRTBase(const std::string &id="")
virtual bool setInstanceLoggingEnabled(const bool loggingEnabled)
sets if logging is enabled for this specific instance
std::string getLastInfoMessage() const
bool setInfoLoggingEnabled(const bool loggingEnabled)
This file contains the GRTBase class. This is the core base class for all the GRT modules...
bool copyGRTBaseVariables(const GRTBase *GRTBase)
bool setWarningLoggingEnabled(const bool loggingEnabled)
static std::string getGRTVersion(bool returnRevision=true)
std::string classId
Stores the name of the class (e.g., MinDist)