1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef __LOGFILE__H__
- #define __LOGFILE__H__
- /*
- ** Include fstream header
- */
- #ifndef _FSTREAM_
- #include <fstream>
- using namespace std;
- #endif
- class CLogFile
- {
- public:
- void PrintCurTime();
- CLogFile();
- CLogFile(const char* tszFileName);
- ~CLogFile();
- CLogFile& operator <<(long lVal);
- CLogFile& operator <<(const char* str);
- CLogFile& operator <<(char tch);
- CLogFile& operator <<(int nVal);
- CLogFile& operator <<(unsigned long ulVal);
- CLogFile& operator <<(double dVal);
- CLogFile& operator <<(unsigned int unVal);
- CLogFile& operator <<(unsigned __int64 unllVal);
- void LOGERROR(char* formatString, ...);
- void reset(const char *filePath);
- private:
- ofstream *m_cOutFile;
- void Output( const char* data);
- void Init(const char *filePath);
- void UnInit();
- char logDir[300];
- };
- #endif // __LOGFILE__H__
|