[telepathy-haze/master] Fix the mapping from PurpleDebugFlags to GLogLevelFlags.

Mike Ruprecht mike.ruprecht at collabora.co.uk
Thu Nov 5 17:56:58 PST 2009


This adds G_LOG_LEVEL_ERROR into the mix which can be called by libpurple's
PURPLE_DEBUG_CRITICAL. G_LOG_LEVEL_ERROR isn't protected from crashing like
G_LOG_LEVEL_CRITICAL is. In my testing this didn't seem to be a problem, but
it might be something to watch out for.
---
 src/debug.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/debug.c b/src/debug.c
index 0f8e48f..f8acb5a 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -67,11 +67,11 @@ haze_debug_set_flags_from_env ()
 static GLogLevelFlags debug_level_map[] =
 {
     G_LOG_LEVEL_DEBUG,    /* PURPLE_DEBUG_ALL */
-    G_LOG_LEVEL_DEBUG,    /* PURPLE_DEBUG_MISC */
-    G_LOG_LEVEL_INFO,     /* PURPLE_DEBUG_INFO */
+    G_LOG_LEVEL_INFO,     /* PURPLE_DEBUG_MISC */
+    G_LOG_LEVEL_MESSAGE,  /* PURPLE_DEBUG_INFO */
     G_LOG_LEVEL_WARNING,  /* PURPLE_DEBUG_WARNING */
-    G_LOG_LEVEL_ERROR,    /* PURPLE_DEBUG_ERROR */
-    G_LOG_LEVEL_CRITICAL, /* PURPLE_DEBUG_CRITICAL */
+    G_LOG_LEVEL_CRITICAL, /* PURPLE_DEBUG_ERROR */
+    G_LOG_LEVEL_ERROR,    /* PURPLE_DEBUG_CRITICAL */
 };
 
 static void
-- 
1.5.6.5




More information about the telepathy-commits mailing list