gmessages: Don’t check G_MESSAGES_DEBUG in old logging API

Now that the old logging API forwards through to the new structured
logging API, we don’t need to check the level or domain of a message
against INFO_LEVELS or G_MESSAGES_DEBUG — just pass it straight through
to the new structured logging API writer function.

https://bugzilla.gnome.org/show_bug.cgi?id=775879
This commit is contained in:
Philip Withnall 2017-03-23 21:12:12 +00:00
parent 8e8deb1336
commit 21b6b1fba7

View File

@ -2995,20 +2995,9 @@ g_log_default_handler (const gchar *log_domain,
const gchar *message,
gpointer unused_data)
{
const gchar *domains;
GLogField fields[4];
int n_fields = 0;
if ((log_level & DEFAULT_LEVELS) || (log_level >> G_LOG_LEVEL_USER_SHIFT))
goto emit;
domains = g_getenv ("G_MESSAGES_DEBUG");
if (((log_level & INFO_LEVELS) == 0) ||
domains == NULL ||
(strcmp (domains, "all") != 0 && (!log_domain || !strstr (domains, log_domain))))
return;
emit:
/* we can be called externally with recursion for whatever reason */
if (log_level & G_LOG_FLAG_RECURSION)
{