[virt-tools-list] [PATCH virt-viewer] Don't override G_LOG_DOMAIN=all
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Mar 12 11:45:52 UTC 2013
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);
--
1.8.1.1.439.g50a6b54
More information about the virt-tools-list
mailing list