Cutting out Gtk/Glib run-time warnings

I’d like to cut out Gtk/Glib warnings, pertaining to my GTK3-based app, which currently go to stderr. To be clear, I’m talking about warning messages coming from Gtk and Glib, not messages that I’m constructing. And in my app I’m neither defining nor undefining G_LOG_USE_STRUCTURED.

I understand that I should use g_log_set_handler() or g_log_set_writer_func() depending on whether structured logging is in force. My question is, how can I tell whether Gtk and Glib are doing the structured thing? Is there a relevant API call, or a known datum such as GTK3 “has always used”, or “has used since version N.M” structured logging? Or should g_getenv(“G_LOG_USE_STRUCTURED”) do it?

Thanks in advance for any guidance.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.