gst: remove custom logger for critical/warnings/fatals
authorMatthew Waters <matthew@centricular.com>
Fri, 8 Apr 2022 03:44:53 +0000 (13:44 +1000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 8 Apr 2022 06:50:02 +0000 (06:50 +0000)
It's not really needed anymore (only calls out to
g_log_default_handler() and interferes with applications using
g_log_set_default_handler().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2135>

subprojects/gstreamer/gst/gst.c

index c168d4d..9d45442 100644 (file)
@@ -168,16 +168,6 @@ static gboolean parse_goption_arg (const gchar * s_opt,
 
 GSList *_priv_gst_preload_plugins = NULL;
 
-static void
-debug_log_handler (const gchar * log_domain,
-    GLogLevelFlags log_level, const gchar * message, gpointer user_data)
-{
-  g_log_default_handler (log_domain, log_level, message, user_data);
-  /* FIXME: do we still need this ? fatal errors these days are all
-   * other than core errors */
-  /* g_on_error_query (NULL); */
-}
-
 enum
 {
   ARG_VERSION = 1,
@@ -670,17 +660,11 @@ static gboolean
 init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
     GError ** error)
 {
-  GLogLevelFlags llf;
-
   if (gst_initialized) {
     GST_DEBUG ("already initialized");
     return TRUE;
   }
 
-  llf = G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL;
-  /* TODO: should we also set up a handler for the other gst libs/domains? */
-  g_log_set_handler (G_LOG_DOMAIN, llf, debug_log_handler, NULL);
-
   _priv_gst_mini_object_initialize ();
   _priv_gst_quarks_initialize ();
   _priv_gst_allocator_initialize ();