#ifndef LOGGER_H #define LOGGER_H #include #include #include #include "string.h" #include using namespace std; // this is the singleton implementation class Logger { public: ~Logger(); static Logger* getInstance(); void appendDebug(string); void appendInfo(string); void appendWarning(string); void appendError(string); void appendFatal(string); void appendTime(); void append(string); void setlogfilename(const string&); string getlogfilename() { return fLogFileName; }; int getDebugLevel() { return fDebugLevel; }; void setDebugLevel(int dlvl) { fDebugLevel = dlvl; }; private: Logger(); Logger(const string&); Logger(const Logger& cc); void append(string, string); ofstream fFile; int fDebugLevel; string fLogFileName; }; #endif // LOGGER_H