|
a/src/utils/debuglog.h |
|
b/src/utils/debuglog.h |
|
... |
|
... |
17 |
#ifndef _DEBUGLOG_H_
|
17 |
#ifndef _DEBUGLOG_H_
|
18 |
#define _DEBUGLOG_H_
|
18 |
#define _DEBUGLOG_H_
|
19 |
/* Macros for log and debug messages */
|
19 |
/* Macros for log and debug messages */
|
20 |
#include <stack>
|
20 |
#include <stack>
|
21 |
|
21 |
|
22 |
#ifndef NO_NAMESPACES
|
|
|
23 |
namespace DebugLog {
|
22 |
namespace DebugLog {
|
24 |
using std::stack;
|
|
|
25 |
#endif // NO_NAMESPACES
|
|
|
26 |
|
23 |
|
27 |
#ifndef DEBUGLOG_USE_THREADS
|
24 |
#ifndef DEBUGLOG_USE_THREADS
|
28 |
#define DEBUGLOG_USE_THREADS 1
|
25 |
#define DEBUGLOG_USE_THREADS 1
|
29 |
#endif
|
26 |
#endif
|
30 |
|
27 |
|
|
... |
|
... |
42 |
#endif
|
39 |
#endif
|
43 |
|
40 |
|
44 |
class DebugLogWriter;
|
41 |
class DebugLogWriter;
|
45 |
|
42 |
|
46 |
class DebugLog {
|
43 |
class DebugLog {
|
47 |
stack<int> levels;
|
44 |
std::stack<int> levels;
|
48 |
int debuglevel;
|
45 |
int debuglevel;
|
49 |
int dodate;
|
46 |
int dodate;
|
50 |
DebugLogWriter *writer;
|
47 |
DebugLogWriter *writer;
|
51 |
bool fileyes;
|
48 |
bool fileyes;
|
52 |
public:
|
49 |
public:
|
|
... |
|
... |
107 |
#if STATICVERBOSITY >= DEBDEB3
|
104 |
#if STATICVERBOSITY >= DEBDEB3
|
108 |
#define LOGDEB3(X) {if (DebugLog::getdbl()->getlevel()>=DEBDEB3){DebugLog::getdbl()->prolog(DEBDEB3,__FILE__,__LINE__) ;DebugLog::getdbl()->log X;}}
|
105 |
#define LOGDEB3(X) {if (DebugLog::getdbl()->getlevel()>=DEBDEB3){DebugLog::getdbl()->prolog(DEBDEB3,__FILE__,__LINE__) ;DebugLog::getdbl()->log X;}}
|
109 |
#else
|
106 |
#else
|
110 |
#define LOGDEB3(X)
|
107 |
#define LOGDEB3(X)
|
111 |
#endif
|
108 |
#endif
|
112 |
#ifndef NO_NAMESPACES
|
|
|
113 |
}
|
109 |
}
|
114 |
#endif // NO_NAMESPACES
|
|
|
115 |
#endif /* _DEBUGLOG_H_ */
|
110 |
#endif /* _DEBUGLOG_H_ */
|