On Mon, Jul 14, 2014 at 6:48 PM, Marc-André Lureau
<mlureau@xxxxxxxxxx> wrote:
Hi
----- Original Message -----
On Mon, Jul 14, 2014 at 1:03 PM, Marc-André Lureau
<marcandre.lureau@xxxxxxxxx> wrote:
>
> On Fri, Jul 11, 2014 at 6:43 PM, Jonathon Jongsma
> <jjongsma@xxxxxxxxxx> wrote:
>> Christophe already fixed this issue, i think. But it looks like
his
>> v2 patch didn't get an ACK:
>>
https://www.redhat.com/archives/virt-tools-list/2014-June/msg00273.html
>
> Good point, but this patch just honors G_MESSAGES_DEBUG for older
> glib version
>
> This may look good, but it is a change of behaviour (nothing
handles
> G_MESSAGES_DEBUG in rhel6), so just setting SPICE_DEBUG=1 won't
work.
> You'll have to set G_MESSAGES_DEBUG on top, I disagree with that.
That's not true. Christophe's change does NOT require
G_MESSAGES_DEBUG
to be set. In fact, the patch actively sets this env variable when
--debug is passed (g_setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1)) so
that the user *doesn't* need to set this variable on newer versions
of
glib, just as they didn't need to set it on older versions of glib.
So
I don't understand your argument.
It just sets for virt-viewer, but not for other glib libraries,
especially SpiceGtk
I think it's the wrong approach to implement G_MESSAGES_DEBUG in vv
just for rhel6
and differ from the rest of the applications there.
OK, went back and looked at this again. You're right that Christophe's
patch is not sufficient to handle the issue of debug messages from
libraries like spice-gtk. But I think his patch is still necessary.
As for your patch, I'm willing to ACK it, but a cleaner solution might
be to simply use g_log_set_handler(G_LOG_DOMAIN, ...) instead of using
g_log_set_default_handler(). Then you wouldn't need to worry about
checking the domain inside the handler. And external libraries (such
as spice-gtk) would continue to use the default glib log handler. It's
up to you.
Jonathon
_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list