info: move category level threshold check into log function dispatcher

Minor optimisation: check category log level earlier in the
log function dispatcher and not only in the default log
function.

https://bugzilla.gnome.org/show_bug.cgi?id=745213
This commit is contained in:
Tim-Philipp Müller 2015-03-12 13:14:52 +00:00
parent 53e8e7da75
commit 2d92f5e6d8

View file

@ -491,6 +491,10 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level,
GSList *handler;
g_return_if_fail (category != NULL);
if (level > gst_debug_category_get_threshold (category))
return;
g_return_if_fail (file != NULL);
g_return_if_fail (function != NULL);
g_return_if_fail (format != NULL);
@ -988,9 +992,6 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
FILE *log_file = user_data ? user_data : stderr;
gchar c;
if (level > gst_debug_category_get_threshold (category))
return;
/* __FILE__ might be a file name or an absolute path or a
* relative path, irrespective of the exact compiler used,
* in which case we want to shorten it to the filename for