Re: [PATCH 4/7] util: json: Don't bother logging output string in virJSONValueToString

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

 



On 3/29/19 9:33 AM, Peter Krempa wrote:
We have tests that validate the XML formatter. Additionally almost every
guide tells users to disable JSON logging. Drop logging of output string
in virJSONValueToString.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>


Assuming that anywhere it might be useful to see the json string in the debug log, it's being debug-logged by the caller of this function...


Reviewed-by: Laine Stump <laine@xxxxxxxxx>


---
  src/util/virjson.c | 7 +------
  1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/util/virjson.c b/src/util/virjson.c
index 7dfc589944..19857d2f2f 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -2048,16 +2048,11 @@ virJSONValueToString(virJSONValuePtr object,
                       bool pretty)
  {
      VIR_AUTOCLEAN(virBuffer) buf = VIR_BUFFER_INITIALIZER;
-    char *ret = NULL;

      if (virJSONValueToBuffer(object, &buf, pretty) < 0)
          return NULL;

-    ret = virBufferContentAndReset(&buf);
-
-    VIR_DEBUG("result=%s", NULLSTR(ret));
-
-    return ret;
+    return virBufferContentAndReset(&buf);
  }



--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux