[metacity] main: kill custom log handler



commit bf5ace85de53baa6b9f8182b5a274ccbbe2f46b2
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Jan 23 21:26:03 2016 +0200

    main: kill custom log handler

 src/core/main.c |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index 5d60094..306356a 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -88,25 +88,6 @@ static void prefs_changed_callback (MetaPreference pref,
                                     gpointer       data);
 
 /**
- * Prints log messages. If Metacity was compiled with backtrace support,
- * also prints a backtrace (see meta_print_backtrace()).
- *
- * \param log_domain  the domain the error occurred in (we ignore this)
- * \param log_level   the log level so that we can filter out less
- *                    important messages
- * \param message     the message to log
- * \param user_data   arbitrary data (we ignore this)
- */
-static void
-log_handler (const gchar   *log_domain,
-             GLogLevelFlags log_level,
-             const gchar   *message,
-             gpointer       user_data)
-{
-  meta_warning ("Log level %d: %s\n", log_level, message);
-}
-
-/**
  * Prints the version notice. This is shown when Metacity is called
  * with the --version switch.
  */
@@ -396,11 +377,6 @@ main (int argc, char **argv)
   struct sigaction act;
   sigset_t empty_mask;
   MetaArguments meta_args;
-  const gchar *log_domains[] = {
-    NULL, G_LOG_DOMAIN, "Gtk", "Gdk", "GLib",
-    "Pango", "GLib-GObject", "GThread"
-  };
-  guint i;
   GIOChannel *channel;
 
   if (setlocale (LC_ALL, "") == NULL)
@@ -477,19 +453,6 @@ main (int argc, char **argv)
   meta_prefs_init ();
   meta_prefs_add_listener (prefs_changed_callback, NULL);
 
-
-#if 1
-
-  for (i=0; i<G_N_ELEMENTS(log_domains); i++)
-    g_log_set_handler (log_domains[i],
-                       G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
-                       log_handler, NULL);
-
-#endif
-
-  if (g_getenv ("METACITY_G_FATAL_WARNINGS") != NULL)
-    g_log_set_always_fatal (G_LOG_LEVEL_MASK);
-
   meta_ui_set_current_theme (meta_prefs_get_theme (), FALSE);
 
   /* Try to find some theme that'll work if the theme preference


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]