-
Notifications
You must be signed in to change notification settings - Fork 0
/
Debug.h
36 lines (27 loc) · 785 Bytes
/
Debug.h
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
#ifndef __WX_DEBUG_H__
#define __WX_DEBUG_H__
#include <stdio.h>
#define LOGFILE "/var/log/wxpro.log"
enum DEBUG_LEVEL { EMERG=0, ALERT, CRIT, ERR, WARNING, NOTICE, INFO, DEBUG };
/*
EMERG system is unusable
ALERT action must be taken immediately
CRIT critical conditions
ERR error conditions
WARNING warning conditions
NOTICE normal but significant condition
INFO informational
DEBUG debug-level messages
*/
class Debug
{
public:
Debug( const char *name );
void setName( const char *name );
int printf( DEBUG_LEVEL level, const char * format, ... );
int logLevel;
static FILE *fp;
private:
const char *name;
};
#endif // __WX_DEBUG_H__