# HG changeset patch # User Christian Hammond # Date 1062569214 0 # Node ID acc4376ce062f18bba2324e2f38e9265a0ad9376 # Parent 41120df7ed943f9ba4cf26f608a30134449f8c81 [gaim-migrate @ 7248] Added some debug wrapper functions, like gaim_debug_info and such. committer: Tailor Script diff -r 41120df7ed94 -r acc4376ce062 src/debug.c --- a/src/debug.c Wed Sep 03 05:21:04 2003 +0000 +++ b/src/debug.c Wed Sep 03 06:06:54 2003 +0000 @@ -56,6 +56,66 @@ } void +gaim_debug_misc(const char *category, const char *format, ...) +{ + va_list args; + + g_return_if_fail(format != NULL); + + va_start(args, format); + gaim_debug_vargs(GAIM_DEBUG_MISC, category, format, args); + va_end(args); +} + +void +gaim_debug_info(const char *category, const char *format, ...) +{ + va_list args; + + g_return_if_fail(format != NULL); + + va_start(args, format); + gaim_debug_vargs(GAIM_DEBUG_INFO, category, format, args); + va_end(args); +} + +void +gaim_debug_warning(const char *category, const char *format, ...) +{ + va_list args; + + g_return_if_fail(format != NULL); + + va_start(args, format); + gaim_debug_vargs(GAIM_DEBUG_WARNING, category, format, args); + va_end(args); +} + +void +gaim_debug_error(const char *category, const char *format, ...) +{ + va_list args; + + g_return_if_fail(format != NULL); + + va_start(args, format); + gaim_debug_vargs(GAIM_DEBUG_ERROR, category, format, args); + va_end(args); +} + +void +gaim_debug_fatal(const char *category, const char *format, ...) +{ + va_list args; + + g_return_if_fail(format != NULL); + + va_start(args, format); + gaim_debug_vargs(GAIM_DEBUG_FATAL, category, format, args); + va_end(args); +} + +void gaim_set_debug_ui_ops(GaimDebugUiOps *ops) { debug_ui_ops = ops; diff -r 41120df7ed94 -r acc4376ce062 src/debug.h --- a/src/debug.h Wed Sep 03 05:21:04 2003 +0000 +++ b/src/debug.h Wed Sep 03 06:06:54 2003 +0000 @@ -31,7 +31,7 @@ typedef enum { GAIM_DEBUG_ALL = 0, /**< All debug levels. */ - GAIM_DEBUG_MISC, /**< General chatter. */ + GAIM_DEBUG_MISC, /**< General chatter. */ GAIM_DEBUG_INFO, /**< General operation Information. */ GAIM_DEBUG_WARNING, /**< Warnings. */ GAIM_DEBUG_ERROR, /**< Errors. */ @@ -81,6 +81,71 @@ void gaim_debug(GaimDebugLevel level, const char *category, const char *format, ...); +/** + * Outputs misc. level debug information. + * + * This is a wrapper for gaim_debug(), and uses GAIM_DEBUG_MISC as + * the level. + * + * @param category The category (or @c NULL). + * @param format The format string. + * + * @see gaim_debug() + */ +void gaim_debug_misc(const char *category, const char *format, ...); + +/** + * Outputs info level debug information. + * + * This is a wrapper for gaim_debug(), and uses GAIM_DEBUG_INFO as + * the level. + * + * @param category The category (or @c NULL). + * @param format The format string. + * + * @see gaim_debug() + */ +void gaim_debug_info(const char *category, const char *format, ...); + +/** + * Outputs warning level debug information. + * + * This is a wrapper for gaim_debug(), and uses GAIM_DEBUG_WARNING as + * the level. + * + * @param category The category (or @c NULL). + * @param format The format string. + * + * @see gaim_debug() + */ +void gaim_debug_warning(const char *category, const char *format, ...); + +/** + * Outputs error level debug information. + * + * This is a wrapper for gaim_debug(), and uses GAIM_DEBUG_ERROR as + * the level. + * + * @param category The category (or @c NULL). + * @param format The format string. + * + * @see gaim_debug() + */ +void gaim_debug_error(const char *category, const char *format, ...); + +/** + * Outputs fatal error level debug information. + * + * This is a wrapper for gaim_debug(), and uses GAIM_DEBUG_ERROR as + * the level. + * + * @param category The category (or @c NULL). + * @param format The format string. + * + * @see gaim_debug() + */ +void gaim_debug_fatal(const char *category, const char *format, ...); + /*@}*/ /**************************************************************************/