[gaim-migrate @ 7248]

Wed, 03 Sep 2003 06:06:54 +0000

author
Christian Hammond <chipx86@chipx86.com>
date
Wed, 03 Sep 2003 06:06:54 +0000
changeset 6721
41d2d86860f3
parent 6720
cdc5348dd848
child 6722
d3dae1263542

[gaim-migrate @ 7248]
Added some debug wrapper functions, like gaim_debug_info and such.

src/debug.c file | annotate | diff | comparison | revisions
src/debug.h file | annotate | diff | comparison | revisions
--- 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, ...);
+
 /*@}*/
 
 /**************************************************************************/

mercurial