X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fs_debug.h;h=5bdf57e8109641d0f952661edbbd57b5f76a98cc;hb=3d59398668e6f0977c147c5efeefe7582d05b25b;hp=8eefe1fa0779996bf1b9ba6f0105e21671444a8d;hpb=56ac07961060874ee62cc83a4af85be97efd6c27;p=ircu2.10.12-pk.git diff --git a/include/s_debug.h b/include/s_debug.h index 8eefe1f..5bdf57e 100644 --- a/include/s_debug.h +++ b/include/s_debug.h @@ -1,12 +1,11 @@ -/* - * s_debug.h - * - * $Id$ +/* @file s_debug.h + * @brief Debug APIs for the ircd. + * @version $Id$ */ #ifndef INCLUDED_s_debug_h #define INCLUDED_s_debug_h #ifndef INCLUDED_config_h -#include "config.h" +#include "config.h" /* Needed for DEBUGMODE */ #endif #ifndef INCLUDED_ircd_defs_h #include "ircd_defs.h" /* Needed for HOSTLEN */ @@ -17,6 +16,7 @@ #endif struct Client; +struct StatDesc; #ifdef DEBUGMODE @@ -24,22 +24,25 @@ struct Client; * Macro's */ +/** If DEBUGMODE is defined, output the debug message. + * @param x A two-or-more element list containing level, format and arguments. + */ #define Debug(x) debug x -#define LOGFILE LPATH +#define LOGFILE LPATH /**< Path to debug log file. */ /* * defined debugging levels */ -#define DEBUG_FATAL 0 -#define DEBUG_ERROR 1 /* report_error() and other errors that are found */ -#define DEBUG_NOTICE 3 -#define DEBUG_DNS 4 /* used by all DNS related routines - a *lot* */ -#define DEBUG_INFO 5 /* general useful info */ -#define DEBUG_NUM 6 /* numerics */ -#define DEBUG_SEND 7 /* everything that is sent out */ -#define DEBUG_DEBUG 8 /* everything that is received */ -#define DEBUG_MALLOC 9 /* malloc/free calls */ -#define DEBUG_LIST 10 /* debug list use */ +#define DEBUG_FATAL 0 /**< fatal error */ +#define DEBUG_ERROR 1 /**< report_error() and other errors that are found */ +#define DEBUG_NOTICE 3 /**< somewhat useful, but non-critical, messages */ +#define DEBUG_DNS 4 /**< used by all DNS related routines - a *lot* */ +#define DEBUG_INFO 5 /**< general useful info */ +#define DEBUG_SEND 7 /**< everything that is sent out */ +#define DEBUG_DEBUG 8 /**< everything that is received */ +#define DEBUG_MALLOC 9 /**< malloc/free calls */ +#define DEBUG_LIST 10 /**< debug list use */ +#define DEBUG_ENGINE 11 /**< debug event engine; can dump gigabyte logs */ /* * proto types @@ -47,7 +50,8 @@ struct Client; extern void vdebug(int level, const char *form, va_list vl); extern void debug(int level, const char *form, ...); -extern void send_usage(struct Client *cptr, char *nick); +extern void send_usage(struct Client *cptr, const struct StatDesc *sd, + char *param); #else /* !DEBUGMODE */ @@ -56,8 +60,9 @@ extern void send_usage(struct Client *cptr, char *nick); #endif /* !DEBUGMODE */ +extern const char* debug_serveropts(void); extern void debug_init(int use_tty); -extern void count_memory(struct Client *cptr, char *nick); -extern char serveropts[]; +extern void count_memory(struct Client *cptr, const struct StatDesc *sd, + char *param); #endif /* INCLUDED_s_debug_h */