|
a/src/utils/debuglog.h |
|
b/src/utils/debuglog.h |
|
... |
|
... |
42 |
#endif
|
42 |
#endif
|
43 |
|
43 |
|
44 |
class DebugLogWriter;
|
44 |
class DebugLogWriter;
|
45 |
|
45 |
|
46 |
class DebugLog {
|
46 |
class DebugLog {
|
47 |
std::stack<int> levels;
|
47 |
stack<int> levels;
|
48 |
int debuglevel;
|
48 |
int debuglevel;
|
49 |
int dodate;
|
49 |
int dodate;
|
50 |
DebugLogWriter *writer;
|
50 |
DebugLogWriter *writer;
|
|
|
51 |
bool fileyes;
|
51 |
public:
|
52 |
public:
|
52 |
DebugLog() : debuglevel(10), dodate(0), writer(0) {}
|
53 |
DebugLog() : debuglevel(10), dodate(0), writer(0), fileyes(true) {}
|
53 |
DebugLog(DebugLogWriter *w) : debuglevel(-1), dodate(0), writer(w) {}
|
54 |
DebugLog(DebugLogWriter *w) : debuglevel(-1), dodate(0), writer(w),
|
|
|
55 |
fileyes(true) {}
|
54 |
virtual ~DebugLog() {}
|
56 |
virtual ~DebugLog() {}
|
55 |
virtual void setwriter(DebugLogWriter *w) {writer = w;}
|
57 |
virtual void setwriter(DebugLogWriter *w) {writer = w;}
|
56 |
virtual DebugLogWriter *getwriter() {return writer;}
|
58 |
virtual DebugLogWriter *getwriter() {return writer;}
|
57 |
virtual void prolog(int lev, const char *srcfname, int line);
|
59 |
virtual void prolog(int lev, const char *srcfname, int line);
|
58 |
virtual void log(const char *s ...);
|
60 |
virtual void log(const char *s ...);
|