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:
parent
7720a1195a
commit
4a1ad61e8e
@ -75,6 +75,9 @@ mpd_log_func(G_GNUC_UNUSED const gchar *log_domain,
|
|||||||
? stderr : stdout;
|
? stderr : stdout;
|
||||||
char *converted;
|
char *converted;
|
||||||
|
|
||||||
|
if (log_level > (int)log_threshold)
|
||||||
|
return;
|
||||||
|
|
||||||
if (log_charset != NULL) {
|
if (log_charset != NULL) {
|
||||||
converted = g_convert_with_fallback(message, -1,
|
converted = g_convert_with_fallback(message, -1,
|
||||||
log_charset, "utf-8",
|
log_charset, "utf-8",
|
||||||
|
Loading…
Reference in New Issue
Block a user