g_log: mask log level before checking prefix flags
authorRyan Lortie <desrt@desrt.ca>
Wed, 14 Mar 2012 00:10:39 +0000 (20:10 -0400)
committerRyan Lortie <desrt@desrt.ca>
Wed, 14 Mar 2012 00:15:21 +0000 (20:15 -0400)
commitfbbdf98668641a6e6494dacb5f5f13703145e6f8
tree26aa2721a8af25ade15456ff27d9f9e25474ca3c
parent545736c0fbc4fdc861a726b293a5b3c1cd611a3c
g_log: mask log level before checking prefix flags

We check if the log level is in the "prefixed" list by checking it
against the g_log_msg_prefix bitfield.

Unfortunately we were failing to mask by G_LOG_LEVEL_MASK first, so if
the FATAL bit was set (for example) then it would never match.  This was
the case for g_error().

https://bugzilla.gnome.org/show_bug.cgi?id=672026
glib/gmessages.c