[libgovirt] utils: Improve log message when subnode is not found



commit 6d3363cf5d5581afdbd0f4d98a9e78d2b383a715
Author: Eduardo Lima (Etrunko) <etrunko redhat com>
Date:   Mon Sep 18 10:47:13 2017 -0300

    utils: Improve log message when subnode is not found
    
    Signed-off-by: Eduardo Lima (Etrunko) <etrunko redhat com>

 govirt/ovirt-utils.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/govirt/ovirt-utils.c b/govirt/ovirt-utils.c
index af1dfc6..a60c754 100644
--- a/govirt/ovirt-utils.c
+++ b/govirt/ovirt-utils.c
@@ -63,9 +63,10 @@ ovirt_rest_xml_node_find(RestXmlNode *node, const char *path)
     pathv = g_strsplit(path, "/", -1);
 
     for (i = 0; i < g_strv_length(pathv); ++i) {
+        gchar *name = node->name;
         node = rest_xml_node_find(node, pathv[i]);
         if (node == NULL) {
-            g_debug("could not find XML node '%s'", pathv[i]);
+            g_debug("could not find subnode '%s' of XML node '%s' (search: %s)", pathv[i], name, path);
             break;
         }
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]