[virt-tools-list] [PATCH virt-viewer] Don't override G_LOG_DOMAIN=all
Hans de Goede
hdegoede at redhat.com
Tue Mar 12 11:58:39 UTC 2013
ACK.
On 03/12/2013 12:45 PM, Marc-André Lureau wrote:
> If the string is different, the GLib log handler will not log all
> messages.
> ---
> src/virt-viewer-app.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index c32321c..ff94c77 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -179,7 +179,8 @@ virt_viewer_app_set_debug(gboolean debug)
> const gchar *doms = g_getenv("G_MESSAGES_DEBUG");
> if (!doms) {
> g_setenv("G_MESSAGES_DEBUG", G_LOG_DOMAIN, 1);
> - } else if (!strstr(doms, G_LOG_DOMAIN)) {
> + } else if (!g_str_equal(doms, "all") &&
> + !strstr(doms, G_LOG_DOMAIN)) {
> gchar *newdoms = g_strdup_printf("%s %s", doms, G_LOG_DOMAIN);
> g_setenv("G_MESSAGES_DEBUG", newdoms, 1);
> g_free(newdoms);
>
More information about the virt-tools-list
mailing list