-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTrace.h
More file actions
41 lines (26 loc) · 1.03 KB
/
Copy pathTrace.h
File metadata and controls
41 lines (26 loc) · 1.03 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef _TRACE_H_
#define _TRACE_H_
#define TRACE_LEVEL_ERROR 0
#define TRACE_LEVEL_WARNING 1
#define TRACE_LEVEL_NORMAL 2
#define TRACE_LEVEL_INFO 3
#define TRACE_LEVEL_DEBUG 6
#define TRACE_ERROR TRACE_LEVEL_ERROR, __FILE__, __LINE__
#define TRACE_WARNING TRACE_LEVEL_WARNING, __FILE__, __LINE__
#define TRACE_NORMAL TRACE_LEVEL_NORMAL, __FILE__, __LINE__
#define TRACE_INFO TRACE_LEVEL_INFO, __FILE__, __LINE__
#define TRACE_DEBUG TRACE_LEVEL_DEBUG, __FILE__, __LINE__
#define MAX_TRACE_LEVEL 6
#define TRACE_DEBUGGING MAX_TRACE_LEVEL
class Mutex; /* Forward */
/* ******************************* */
class Trace {
public:
static u_int8_t traceLevel;
public:
static void set_trace_level(u_int8_t id);
static void traceEvent(int eventTraceLevel, const char* file, const int line, const char * format, ...);
static void traceEventN(int eventTraceLevel, const char* file, const int line, const char * format, ...);
static void traceEventRaw(const char * format, ...);
};
#endif /* _TRACE_H_ */