log: fix log level mask to be able to test the trace level

Trace is 1<<8 and the mask was 0xFF, allowing only bits 0-7
to be tested
This commit is contained in:
George Kiagiadakis 2023-05-25 17:59:56 +03:00
parent bd672b71f7
commit 8912dc25c3

View file

@ -85,9 +85,9 @@ wp_log_topic_is_enabled (WpLogTopic *topic, GLogLevelFlags log_level)
wp_log_topic_init (topic);
if (wp_log_topic_has_custom_level (topic))
return (topic->flags & (log_level & 0xFF)) != 0;
return (topic->flags & (log_level & 0xFFFF)) != 0;
else
return (*topic->global_flags & (log_level & 0xFF)) != 0;
return (*topic->global_flags & (log_level & 0xFFFF)) != 0;
}
#define wp_local_log_topic_is_enabled(log_level) \