21 #ifndef GRT_ERROR_LOG_HEADER
22 #define GRT_ERROR_LOG_HEADER
24 #include "ObserverManager.h"
31 ErrorLogMessage(std::string proceedingText =
"",std::string message =
""){
32 this->proceedingText = proceedingText;
33 this->message = message;
39 std::string getProceedingText()
const {
40 return proceedingText;
43 std::string getMessage()
const {
47 std::string proceedingText;
53 ErrorLog(std::string proceedingText =
""){
54 setProceedingText(proceedingText);
55 Log::loggingEnabledPtr = &errorLoggingEnabled;
61 this->proceedingText = rhs.proceedingText;
62 this->writeProceedingText = rhs.writeProceedingText;
63 this->lastMessage = rhs.lastMessage;
64 this->loggingEnabledPtr = &errorLoggingEnabled;
65 this->writeProceedingTextPtr = &writeProceedingText;
66 this->lastMessagePtr = &lastMessage;
72 virtual bool getLoggingEnabled()
const{
return errorLoggingEnabled; }
75 static bool enableLogging(
bool loggingEnabled);
82 virtual void triggerCallback(
const std::string &message )
const{
83 observerManager.notifyObservers(
ErrorLogMessage(proceedingText,message) );
88 static bool errorLoggingEnabled;
93 #endif //GRT_ERROR_LOG_HEADER