From 4a1ad61e8e5fb7703bc945b0ee6dfdd3eb78e622 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 14 Nov 2008 18:27:11 +0100 Subject: log: check the log threshold in log_func() The threshold was only checked in the deprecated logging functions (ERROR(), WARNING(), ...). Add the check to the GLib logging handler. --- src/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/log.c b/src/log.c index 946f4164c..350b57769 100644 --- a/src/log.c +++ b/src/log.c @@ -75,6 +75,9 @@ mpd_log_func(G_GNUC_UNUSED const gchar *log_domain, ? stderr : stdout; char *converted; + if (log_level > (int)log_threshold) + return; + if (log_charset != NULL) { converted = g_convert_with_fallback(message, -1, log_charset, "utf-8", -- cgit v1.2.3