1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| #ifndef _LOG_UTIL_H_
| #define _LOG_UTIL_H_
|
| #include <string>
| #include <iostream>
|
| #define DEBUG(input) DEBUG_LOG((input), (__FILE__), (__LINE__));
| #define ERROR(input) ERROR_LOG((input), (__FILE__), (__LINE__));
| #define WARN(input) WARN_LOG((input), (__FILE__), (__LINE__));
|
| using namespace std;
| // using namespace log4cplus;
|
| void DEBUG_LOG(const std::string& strInfo, const std::string& strFile, int iLine);
| void ERROR_LOG(const std::string& strInfo, const std::string& strFile, int iLine);
| void WARN_LOG(const std::string& strInfo, const std::string& strFile, int iLine);
|
| class CLog
| {
| public:
| static CLog* Initialize(const std::string& strLogFile);
|
| private:
| CLog(const std::string& strLogFile);
| static CLog* pInstance;
| };
|
| #endif
|
|