changeset 6721:acc4376ce062

[gaim-migrate @ 7248] Added some debug wrapper functions, like gaim_debug_info and such. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 03 Sep 2003 06:06:54 +0000
parents 41120df7ed94
children 7dd61b3efa38
files src/debug.c src/debug.h
diffstat 2 files changed, 126 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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, ...);
+
 /*@}*/
 
 /**************************************************************************/