diff src/server.c @ 5211:0241d6b6702d

[gaim-migrate @ 5581] Wrote a new debugging API, and of course core/ui split it. Debug statements can now have debug levels and categories, for future filtering of stuff, and color highlighting. It's nifty, m'kay? committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 26 Apr 2003 06:46:08 +0000
parents fefad67de2c7
children 49f0de976037
line wrap: on
line diff
--- a/src/server.c	Sat Apr 26 05:31:26 2003 +0000
+++ b/src/server.c	Sat Apr 26 06:46:08 2003 +0000
@@ -55,11 +55,13 @@
 			return;
 		}
 
-		debug_printf(PACKAGE " " VERSION " logging in %s using %s\n",
-					 account->username, p->info->name);
+		gaim_debug(GAIM_DEBUG_INFO, "server",
+				   PACKAGE " " VERSION " logging in %s using %s\n",
+				   account->username, p->info->name);
 		account->connecting = TRUE;
 		connecting_count++;
-		debug_printf("connecting_count: %d\n", connecting_count);
+		gaim_debug(GAIM_DEBUG_MISC, "server",
+				   "connection count: %d\n", connecting_count);
 		gaim_event_broadcast(event_connecting, account);
 		prpl_info->login(account);
 	}
@@ -82,10 +84,10 @@
 static void update_keepalive(struct gaim_connection *gc, gboolean on)
 {
 	if (on && !gc->keepalive) {
-		debug_printf("allowing NOP\n");
+		gaim_debug(GAIM_DEBUG_INFO, "server", "allowing NOP\n");
 		gc->keepalive = g_timeout_add(60000, send_keepalive, gc);
 	} else if (!on && gc->keepalive > 0) {
-		debug_printf("removing NOP\n");
+		gaim_debug(GAIM_DEBUG_INFO, "server", "removing NOP\n");
 		g_source_remove(gc->keepalive);
 		gc->keepalive = 0;
 	}
@@ -754,7 +756,7 @@
 	 */
 
 	if (flags & IM_FLAG_GAIMUSER)
-		debug_printf("%s is a gaim user.\n", who);
+		gaim_debug(GAIM_DEBUG_MISC, "%s is a gaim user.\n", who);
 
 	/*
 	 * We should update the conversation window buttons and menu,
@@ -1029,7 +1031,8 @@
 	}
 
 	if (!b) {
-		debug_printf("Error, no such buddy %s\n", name);
+		gaim_debug(GAIM_DEBUG_ERROR, "server",
+				   "No such buddy: %s\n", name);
 		return;
 	}
 
@@ -1308,7 +1311,8 @@
 
 	gaim_event_broadcast(event_chat_leave, g, gaim_chat_get_id(chat));
 
-	debug_printf("Leaving room %s.\n", gaim_conversation_get_name(conv));
+	gaim_debug(GAIM_DEBUG_INFO, "server", "Leaving room: %s\n",
+			   gaim_conversation_get_name(conv));
 
 	g->buddy_chats = g_slist_remove(g->buddy_chats, conv);