aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-14 18:27:11 +0100
committerMax Kellermann <max@duempel.org>2008-11-14 18:27:11 +0100
commit4a1ad61e8e5fb7703bc945b0ee6dfdd3eb78e622 (patch)
treef080bc803e3d3eead53dcc708e41e3b72c8cea69 /src/log.c
parent7720a1195ae9e90a427e0fc5d14023405d224b6a (diff)
downloadmpd-4a1ad61e8e5fb7703bc945b0ee6dfdd3eb78e622.tar.gz
mpd-4a1ad61e8e5fb7703bc945b0ee6dfdd3eb78e622.tar.xz
mpd-4a1ad61e8e5fb7703bc945b0ee6dfdd3eb78e622.zip
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.
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c3
1 files changed, 3 insertions, 0 deletions
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",