main: Remove telepathy-specific log handling

The built-in telepathy integration is far less prominent than it
used to be, and doesn't really justify a link time dependency to
send debug message over D-Bus.

https://bugzilla.gnome.org/show_bug.cgi?id=771721
This commit is contained in:
Florian Müllner 2016-09-21 23:28:54 +02:00
parent 8f8e512b37
commit 2d814bfc5e
2 changed files with 1 additions and 21 deletions

View File

@ -90,7 +90,6 @@ GTK_MIN_VERSION=3.15.0
GIO_MIN_VERSION=2.45.3 GIO_MIN_VERSION=2.45.3
LIBECAL_MIN_VERSION=3.5.3 LIBECAL_MIN_VERSION=3.5.3
LIBEDATASERVER_MIN_VERSION=3.17.2 LIBEDATASERVER_MIN_VERSION=3.17.2
TELEPATHY_GLIB_MIN_VERSION=0.17.5
POLKIT_MIN_VERSION=0.100 POLKIT_MIN_VERSION=0.100
STARTUP_NOTIFICATION_MIN_VERSION=0.11 STARTUP_NOTIFICATION_MIN_VERSION=0.11
GCR_MIN_VERSION=3.7.5 GCR_MIN_VERSION=3.7.5
@ -111,7 +110,6 @@ SHARED_PCS="gio-unix-2.0 >= $GIO_MIN_VERSION
libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
libcanberra libcanberra-gtk3 libcanberra libcanberra-gtk3
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
polkit-agent-1 >= $POLKIT_MIN_VERSION polkit-agent-1 >= $POLKIT_MIN_VERSION
gcr-base-3 >= $GCR_MIN_VERSION" gcr-base-3 >= $GCR_MIN_VERSION"
if test x$have_systemd = xyes; then if test x$have_systemd = xyes; then

View File

@ -20,8 +20,6 @@
#include <meta/meta-plugin.h> #include <meta/meta-plugin.h>
#include <meta/prefs.h> #include <meta/prefs.h>
#include <atk-bridge.h> #include <atk-bridge.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/debug-sender.h>
#include "shell-global.h" #include "shell-global.h"
#include "shell-global-private.h" #include "shell-global-private.h"
@ -297,17 +295,10 @@ default_log_handler (const char *log_domain,
const char *message, const char *message,
gpointer data) gpointer data)
{ {
TpDebugSender *sender = data;
GTimeVal now; GTimeVal now;
g_get_current_time (&now); g_get_current_time (&now);
/* Send telepathy debug through DBus */
if (log_domain != NULL && g_str_has_prefix (log_domain, "tp-glib"))
tp_debug_sender_add_message (sender, &now, log_domain, log_level, message);
/* Filter out telepathy-glib logs, we don't want to flood Shell's output
* with those. */
if (!log_domain || !g_str_has_prefix (log_domain, "tp-glib")) if (!log_domain || !g_str_has_prefix (log_domain, "tp-glib"))
g_log_default_handler (log_domain, log_level, message, data); g_log_default_handler (log_domain, log_level, message, data);
@ -408,7 +399,6 @@ main (int argc, char **argv)
GOptionContext *ctx; GOptionContext *ctx;
GError *error = NULL; GError *error = NULL;
int ecode; int ecode;
TpDebugSender *sender;
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@ -451,14 +441,7 @@ main (int argc, char **argv)
shell_introspection_init (); shell_introspection_init ();
shell_fonts_init (); shell_fonts_init ();
/* Turn on telepathy-glib debugging but filter it out in g_log_set_default_handler (default_log_handler, NULL);
* default_log_handler. This handler also exposes all the logs over D-Bus
* using TpDebugSender. */
tp_debug_set_flags ("all");
sender = tp_debug_sender_dup ();
g_log_set_default_handler (default_log_handler, sender);
/* Initialize the global object */ /* Initialize the global object */
if (session_mode == NULL) if (session_mode == NULL)
@ -473,7 +456,6 @@ main (int argc, char **argv)
g_debug ("Doing final cleanup"); g_debug ("Doing final cleanup");
_shell_global_destroy_gjs_context (shell_global_get ()); _shell_global_destroy_gjs_context (shell_global_get ());
g_object_unref (shell_global_get ()); g_object_unref (shell_global_get ());
g_object_unref (sender);
return ecode; return ecode;
} }