--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
@@ -353,7 +353,8 @@ _priv_gst_debug_init (void)
   _GST_CAT_DEBUG = _gst_debug_category_new ("GST_DEBUG",
       GST_DEBUG_BOLD | GST_DEBUG_FG_YELLOW, "debugging subsystem");
 
-  gst_debug_add_log_function (gst_debug_log_default, NULL, NULL);
+  if (!__log_functions)
+    gst_debug_add_log_function (gst_debug_log_default, NULL, NULL);
 
   /* FIXME: add descriptions here */
   GST_CAT_GST_INIT = _gst_debug_category_new ("GST_INIT",
