src/Log.h

Go to the documentation of this file.
00001 /* Crown and Cutlass
00002  * Log Object Header
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   // Log an error message
00017   void Message(std::string msg);
00018   void Message(const char *msg, ...);
00019 
00020   // Log an error message only if set to debug in config
00021   void DebugMessage(std::string msg);
00022   void DebugMessage(const char *msg, ...);
00023 
00024   // Enable or disable debug logging
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

Generated on Mon Jan 8 22:34:12 2007 for CrownandCutlass by  doxygen 1.4.7