6 #ifndef INCLUDED_s_debug_h
7 #define INCLUDED_s_debug_h
8 #ifndef INCLUDED_config_h
9 #include "config.h" /* Needed for DEBUGMODE */
11 #ifndef INCLUDED_ircd_defs_h
12 #include "ircd_defs.h" /* Needed for HOSTLEN */
14 #ifndef INCLUDED_stdarg_h
16 #define INCLUDED_stdarg_h
28 /** If DEBUGMODE is defined, output the debug message.
29 * @param x A two-or-more element list containing level, format and arguments.
31 #define Debug(x) debug x
32 #define LOGFILE LPATH /**< Path to debug log file. */
35 * defined debugging levels
37 #define DEBUG_FATAL 0 /**< fatal error */
38 #define DEBUG_ERROR 1 /**< report_error() and other errors that are found */
39 #define DEBUG_NOTICE 3 /**< somewhat useful, but non-critical, messages */
40 #define DEBUG_DNS 4 /**< used by all DNS related routines - a *lot* */
41 #define DEBUG_INFO 5 /**< general useful info */
42 #define DEBUG_SEND 7 /**< everything that is sent out */
43 #define DEBUG_DEBUG 8 /**< everything that is received */
44 #define DEBUG_MALLOC 9 /**< malloc/free calls */
45 #define DEBUG_LIST 10 /**< debug list use */
46 #define DEBUG_ENGINE 11 /**< debug event engine; can dump gigabyte logs */
52 extern void vdebug(int level, const char *form, va_list vl);
53 extern void debug(int level, const char *form, ...);
54 extern void send_usage(struct Client *cptr, const struct StatDesc *sd,
57 #else /* !DEBUGMODE */
60 #define LOGFILE "/dev/null"
62 #endif /* !DEBUGMODE */
64 extern const char* debug_serveropts(void);
65 extern void debug_init(int use_tty);
66 extern void count_memory(struct Client *cptr, const struct StatDesc *sd,
69 #endif /* INCLUDED_s_debug_h */