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.
This commit is contained in:
Max Kellermann 2008-11-14 18:27:11 +01:00
parent 7720a1195a
commit 4a1ad61e8e

View File

@ -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",