gtg icon indicating copy to clipboard operation
gtg copied to clipboard

Automatically enable GTG + liblarch's debug logs when run under GNOME Builder?

Open nekohayo opened this issue 4 years ago • 3 comments

When opened as a "project" in GNOME Builder and launched from there (with ctrl+F5), you can see a bunch of debug messages being printed to GNOME Builder's run console, but those are all debug messages from GTK, GDK, etc.

Ideally, if it's going to spam my view like that, it should also include liblarch and GTG's own debug messages.

I have no idea how that's done anyhow, so marking this ticket "patch-or-wont-happen" for contributors who feel particularly interested in this sort of integration with GNOME Builder.

nekohayo avatar May 28 '20 14:05 nekohayo

Or maybe this should be automatically turned on anyway for any dev version being run (whether in a flatpak, or through gtg.sh, or...)

nekohayo avatar May 28 '20 14:05 nekohayo

This depends on having Meson profiles, so we can have a dev profile (and a nightly flatpak to go with it).

diegogangl avatar May 29 '20 02:05 diegogangl

GNOME Builder sets G_MESSAGES_DEBUG to all, whiclh is why it's showing all the debug messages. The variable is qutie handy; you can set, for example, G_MESSAGES_DEBUG=GTG, and it will only show debug messages from the GTG domain. In the future, GNOME Builder might (or at any rate, probably should) add the option to configure this.

To enable this, one needs to use GLib's logging functions, like GLib.log_variant(), instead of Python's logger. See, for example, GNOME Music and GNOME Builder's logger.

johnfactotum avatar Jul 08 '20 02:07 johnfactotum