[virt-tools-list] [virt-viewer] Use the same debug log handler regardless of glib version

Christophe Fergeau cfergeau at redhat.com
Thu Jun 12 12:00:34 UTC 2014


On Thu, Jun 12, 2014 at 06:44:59AM -0400, Marc-André Lureau wrote:
> ----- Original Message -----
> > Commit 2bd835fb introduced a custom log handler to ensure
> > we never show debug messages by default regardless of glib
> > version (older glib were showing them by default).
> > These messages are only shown if the global variable 'doDebug'
> > is set (ie when virt-viewer is started with --debug).
> > 
> > This special log handling is only performed with older glib versions.
> > However, virt_viewer_app_set_debug() also has some code used with newer
> > glib version to make sure debug messages are displayed  when using
> > --debug.
> > 
> > Using the custom log handler regardless of the glib version allows to
> > get rid of this version-specific code (and avoids a bug with
> > glib_check_version() with the current code, the check for
> > glib_check_version() return value is inverted).
> 
> That changes a bit the behaviour though, you will need to set G_MESSAGES_DEBUG on >2.32 instead of just using --debug.
> and on > 2.32, you are requiring --debug to print the g_debug() messages (that was not the case before).

Eh, forgot to run make install before testing /o\ Will send a version
looking at G_MESSAGES_DEBUG on older glibs

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140612/d2998e69/attachment.sig>


More information about the virt-tools-list mailing list