[telepathy-gabble/master] Override the default log handler, and change log domain.
Jonny Lamb
jonny.lamb at collabora.co.uk
Wed Jun 3 06:10:51 PDT 2009
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
src/Makefile.am | 3 ++-
src/gabble.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index f3c10b2..62b6a1a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -165,7 +165,8 @@ AM_CFLAGS = $(ERROR_CFLAGS) -I$(top_srcdir) -I$(top_builddir) \
@DBUS_CFLAGS@ @GLIB_CFLAGS@ @LOUDMOUTH_CFLAGS@ \
@HANDLE_LEAK_DEBUG_CFLAGS@ @TP_GLIB_CFLAGS@ \
@SOUP_CFLAGS@ @UUID_CFLAGS@ \
- -I $(top_srcdir)/lib -I $(top_builddir)/lib
+ -I $(top_srcdir)/lib -I $(top_builddir)/lib \
+ -DG_LOG_DOMAIN=\"gabble\"
ALL_LIBS = @DBUS_LIBS@ @GLIB_LIBS@ @LOUDMOUTH_LIBS@ @TP_GLIB_LIBS@ \
@SOUP_LIBS@ @UUID_LIBS@
diff --git a/src/gabble.c b/src/gabble.c
index beae223..9f49778 100644
--- a/src/gabble.c
+++ b/src/gabble.c
@@ -91,9 +91,9 @@ gabble_main (int argc,
gabble_debug_set_flags_from_env ();
if (g_getenv ("GABBLE_TIMING") != NULL)
- g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, stamp_log, NULL);
+ g_log_set_default_handler (stamp_log, NULL);
else
- g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, simple_log, NULL);
+ g_log_set_default_handler (simple_log, NULL);
if (g_getenv ("GABBLE_PERSIST") != NULL)
tp_debug_set_persistent (TRUE);
--
1.5.6.5
More information about the telepathy-commits
mailing list