diff console/gntdebug.c @ 14125:7dfa024c1a4a

[gaim-migrate @ 16763] Redirect the debug messages to stderr when started with -d. Fix the order of the windows in the windowlist. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 15 Aug 2006 04:07:38 +0000
parents 2d1b41e3cf0d
children 43d9afee9c3c
line wrap: on
line diff
--- a/console/gntdebug.c	Tue Aug 15 04:05:27 2006 +0000
+++ b/console/gntdebug.c	Tue Aug 15 04:07:38 2006 +0000
@@ -80,6 +80,12 @@
 	debug.window = debug.tview = NULL;
 }
 
+static void
+print_stderr(const char *string)
+{
+	g_printerr("%s", string);
+}
+
 void gg_debug_window_show()
 {
 	if (debug.window == NULL)
@@ -102,6 +108,7 @@
 
 void gg_debug_init()
 {
+	g_set_print_handler(print_stderr);   /* Redirect the debug messages to stderr */
 	if (gaim_debug_is_enabled())
 		gg_debug_window_show();
 }