GNOME Bugzilla – Bug 637573
Use GLib log functions for debugging
Last modified: 2014-12-29 06:31:04 UTC
Mutter currently uses a custom "meta_warning" for most of its output, and redirects standard logging to this, but this has problems: 1) it is translated, so before reporting bugs one has to try to reproduce under LANG=C (not always possible) 2) it uses numerical log levels (what's log level 32, 8, 128? Message, CRITICAL, DEBUG are easier to understand) 3) it omits the log domain (so you cannot know where the error comes from) 4) it only eats some domains, for example Clutter and Cogl are not included
Created attachment 176705 [details] [review] Use GLib facilities for debugging output Remove meta_warning / meta_bug, replace them with g_warning, g_critical and g_error, and at the same time remove the custom log handler (it is easier to grep for "mutter" than for "Window manager warning", and it is useful to have log levels spelled out in full). Also, mark errors and warning as untranslatable, so that bug reports are not dependent on LANG.
See also: https://bugzilla.gnome.org/show_bug.cgi?id=622441 https://bugzilla.gnome.org/show_bug.cgi?id=620359
Oh great. So I'm not the only one to think that meta_warning must be killed. The primary concern with those patches seemed to be handling of file logs. But: 1) meta_verbose / meta_topic are preserved, only meta_warning and meta_bug are removed 2) it is possible to install an handler for the Mutter log domain, so only warnings that are related to window management are logged 3) it is possible to run "mutter 2> mutter.log", to get everything on a file
Review of attachment 176705 [details] [review]: Looks like a lot of code churn that will make merging patches between Mutter and Metacity harder for minimal gain. Before anybody does any other patches here, I'd like us to have agreement here on exactly what we are trying to fix/improve and then we can figure the best tactic.
As much as I'd like to see this, patch doesn't apply and it has rotted for 4 years.