f3bbfd7852543e5bd6a19f4bb9506294c95f0daa
[ircu2.10.12-pk.git] / include / s_debug.h
1 /*
2  * s_debug.h
3  *
4  * $Id$
5  */
6 #ifndef INCLUDED_s_debug_h
7 #define INCLUDED_s_debug_h
8 #ifndef INCLUDED_ircd_defs_h
9 #include "ircd_defs.h"       /* Needed for HOSTLEN */
10 #endif
11 #ifndef INCLUDED_stdarg_h
12 #include <stdarg.h>
13 #define INCLUDED_stdarg_h
14 #endif
15
16 struct Client;
17
18 #ifdef DEBUGMODE
19
20 /*
21  * Macro's
22  */
23
24 #define Debug(x) debug x
25 #define LOGFILE LPATH
26
27 /*
28  * defined debugging levels
29  */
30 #define DEBUG_FATAL  0
31 #define DEBUG_ERROR  1  /* report_error() and other errors that are found */
32 #define DEBUG_NOTICE 3
33 #define DEBUG_DNS    4  /* used by all DNS related routines - a *lot* */
34 #define DEBUG_INFO   5  /* general useful info */
35 #define DEBUG_NUM    6  /* numerics */
36 #define DEBUG_SEND   7  /* everything that is sent out */
37 #define DEBUG_DEBUG  8  /* everything that is received */ 
38 #define DEBUG_MALLOC 9  /* malloc/free calls */
39 #define DEBUG_LIST  10  /* debug list use */
40
41 /*
42  * proto types
43  */
44
45 extern void vdebug(int level, const char *form, va_list vl);
46 extern void debug(int level, const char *form, ...);
47 extern void send_usage(struct Client *cptr, char *nick);
48
49 #else /* !DEBUGMODE */
50
51 #define Debug(x)
52 #define LOGFILE "/dev/null"
53
54 #endif /* !DEBUGMODE */
55
56 extern const char* debug_serveropts(void);
57 extern void debug_init(int use_tty);
58 extern void count_memory(struct Client *cptr, char *nick);
59
60 #endif /* INCLUDED_s_debug_h */