After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637573 - Use GLib log functions for debugging
Use GLib log functions for debugging
Status: RESOLVED WONTFIX
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2010-12-19 14:30 UTC by Giovanni Campagna
Modified: 2014-12-29 06:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use GLib facilities for debugging output (70.74 KB, patch)
2010-12-19 14:30 UTC, Giovanni Campagna
rejected Details | Review

Description Giovanni Campagna 2010-12-19 14:30:17 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
Comment 1 Giovanni Campagna 2010-12-19 14:30:51 UTC
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.
Comment 3 Giovanni Campagna 2010-12-19 16:33:32 UTC
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
Comment 4 Owen Taylor 2010-12-20 16:47:43 UTC
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.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-12-29 06:31:04 UTC
As much as I'd like to see this, patch doesn't apply and it has rotted for 4 years.