00001
00002
00003
00004
00005 #if !defined ( _LOG_H_ )
00006 #define _LOG_H_
00007
00008 #include <fstream>
00009 #include <string>
00010
00011 class Log {
00012 public:
00013 Log(bool logToFile);
00014 ~Log();
00015
00016
00017 void Message(std::string msg);
00018 void Message(const char *msg, ...);
00019
00020
00021 void DebugMessage(std::string msg);
00022 void DebugMessage(const char *msg, ...);
00023
00024
00025 void SetDebugMode(bool debugMode);
00026
00027 static bool OpenLog(bool logToFile);
00028 static void CloseLog();
00029
00030 static Log *s_log;
00031
00032 private:
00033 bool m_debugMode;
00034
00035 std::ofstream m_logFile;
00036 };
00037
00038 #endif