diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c index d61d833dee..2ba47a4593 100644 --- a/testsuite/reftests/gtk-reftest.c +++ b/testsuite/reftests/gtk-reftest.c @@ -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; diff --git a/tools/gtk-builder-tool.c b/tools/gtk-builder-tool.c index a17af70b89..347c96211b 100644 --- a/tools/gtk-builder-tool.c +++ b/tools/gtk-builder-tool.c @@ -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