/* * Log.h * * Created on: 16.01.2017 * Author: piotrek */ #ifndef LOG_H_ #define LOG_H_ #include "common.h" enum LOG_COLOR { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE }; class Log { int lineNumber; LOG_COLOR color; string delimiter; string *objectName; pthread_mutex_t *writeMutex; protected: string* getObjectName() const; void setObjectName(string* objectName); public: Log(); void print(string msg); LOG_COLOR getColor() const; void setColor(LOG_COLOR color); const string& getDelimiter() const; void setDelimiter(const string& delimiter); int getLineNumber() const; void setLineNumber(int lineNumber); void setLogParams(int lineNumber, LOG_COLOR color, string delimiter); static pthread_mutex_t * getMutex(); }; #endif /* LOG_H_ */