diff options
author | Jonny Lamb <jonnylamb@gnome.org> | 2010-02-17 00:38:21 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-02-17 01:47:13 +0800 |
commit | 37aabc6b1e5b97747da6bb1b3070fa2fdaffa530 (patch) | |
tree | 1f37308a4e39967ca2d970f7e7fe5c6b8295d107 /libempathy/empathy-debug.c | |
parent | fd49fd64d74d56ae4e1cf514edfb1aec348832a4 (diff) | |
download | gsoc2013-empathy-37aabc6b1e5b97747da6bb1b3070fa2fdaffa530.tar gsoc2013-empathy-37aabc6b1e5b97747da6bb1b3070fa2fdaffa530.tar.gz gsoc2013-empathy-37aabc6b1e5b97747da6bb1b3070fa2fdaffa530.tar.bz2 gsoc2013-empathy-37aabc6b1e5b97747da6bb1b3070fa2fdaffa530.tar.lz gsoc2013-empathy-37aabc6b1e5b97747da6bb1b3070fa2fdaffa530.tar.xz gsoc2013-empathy-37aabc6b1e5b97747da6bb1b3070fa2fdaffa530.tar.zst gsoc2013-empathy-37aabc6b1e5b97747da6bb1b3070fa2fdaffa530.zip |
Use TpDebugSender to publish debug messages (#607330)
Diffstat (limited to 'libempathy/empathy-debug.c')
-rw-r--r-- | libempathy/empathy-debug.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libempathy/empathy-debug.c b/libempathy/empathy-debug.c index 487827791..1f29259fd 100644 --- a/libempathy/empathy-debug.c +++ b/libempathy/empathy-debug.c @@ -30,11 +30,10 @@ #include <glib/gstdio.h> #include <telepathy-glib/debug.h> +#include <telepathy-glib/debug-sender.h> #include "empathy-debug.h" -#include "empathy-debugger.h" - #ifdef ENABLE_DEBUG static EmpathyDebugFlags flags = 0; @@ -115,20 +114,23 @@ empathy_debug_free (void) } static void -log_to_debugger (EmpathyDebugFlags flag, +log_to_debug_sender (EmpathyDebugFlags flag, const gchar *message) { - EmpathyDebugger *dbg = empathy_debugger_get_singleton (); + TpDebugSender *sender; gchar *domain; GTimeVal now; + sender = tp_debug_sender_dup (); + g_get_current_time (&now); domain = g_strdup_printf ("%s/%s", G_LOG_DOMAIN, debug_flag_to_key (flag)); - empathy_debugger_add_message (dbg, &now, domain, G_LOG_LEVEL_DEBUG, message); + tp_debug_sender_add_message (sender, &now, domain, G_LOG_LEVEL_DEBUG, message); g_free (domain); + g_object_unref (sender); } void @@ -143,7 +145,7 @@ empathy_debug (EmpathyDebugFlags flag, message = g_strdup_vprintf (format, args); va_end (args); - log_to_debugger (flag, message); + log_to_debug_sender (flag, message); if (flag & flags) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s", message); |