mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
Merge branch 'harmonize-would_drop' into 'main'
Harmonize would_drop() replacement for g_log_writer_default_would_drop() See merge request GNOME/gtk!4935
This commit is contained in:
commit
63b50f48a9
@ -507,7 +507,7 @@ log_writer (GLogLevelFlags log_level,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!would_drop (log_level, NULL))
|
||||
if (!would_drop (log_level, NULL))
|
||||
return g_log_writer_standard_streams (log_level, fields, n_fields, user_data);
|
||||
|
||||
return G_LOG_WRITER_HANDLED;
|
||||
|
@ -55,9 +55,13 @@ static gboolean
|
||||
would_drop (GLogLevelFlags level,
|
||||
const char *domain)
|
||||
{
|
||||
#if GLIB_CHECK_VERSION (2, 68, 0)
|
||||
return g_log_writer_default_would_drop (level, domain);
|
||||
#else
|
||||
return (level & (G_LOG_LEVEL_ERROR |
|
||||
G_LOG_LEVEL_CRITICAL |
|
||||
G_LOG_LEVEL_WARNING)) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static GLogWriterOutput
|
||||
|
Loading…
Reference in New Issue
Block a user