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