00001
00044
00045 #ifndef _CLOGGER_H_
00046 #define _CLOGGER_H_
00047
00048
00049
00057
00058 class CLogger
00059 {
00060 public:
00061 CLogger(char* _pcLogFileName);
00062 ~CLogger();
00063
00064 void LogStart(void);
00065 void LogEnd(void);
00066
00067 inline char* LogFileName(void) const {return m_pcLogFileName;}
00068 inline FILE* FileHandle(void) const {return m_hLogFile;}
00069 inline bool LoggingEnabled(void) const {return m_bLoggingEnabled;}
00070
00071 void LoggingEnabled(bool _bLog);
00072 void LogMessage(const char *_pcFormat, ...);
00073 void LogError(const char *_pcFormat, ...);
00074 void LogFunction(const char *_pcFormat, ...);
00075
00076 private:
00077 void LogEntry(const char *_pcFormat, ...);
00078
00079 private:
00080
00081 FILE* m_hLogFile;
00082 char* m_pcLogFileName;
00083 char m_acTemp[512];
00084 bool m_bLoggingEnabled;
00085 };
00086
00087
00088
00092
00093 extern CLogger* g_pGlobalLog;
00094
00095
00096
00100
00101 extern bool CLoggerGlobalLogExists(void);
00102
00103
00104 #endif