gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: only log with json_dumpf() if ex


From: gnunet
Subject: [taler-exchange] branch master updated: only log with json_dumpf() if explicitly compiled via DEBUG #define
Date: Sun, 20 Dec 2020 20:05:50 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 95333b42 only log with json_dumpf() if explicitly compiled via DEBUG 
#define
95333b42 is described below

commit 95333b422380ba955d61a074f3788b958283a427
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Dec 20 20:05:48 2020 +0100

    only log with json_dumpf() if explicitly compiled via DEBUG #define
---
 src/lib/exchange_api_handle.c              | 8 ++++++++
 src/lib/exchange_api_management_get_keys.c | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index f45025d0..df92ba4d 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -52,6 +52,10 @@
  */
 #define EXCHANGE_SERIALIZATION_FORMAT_VERSION 0
 
+/**
+ * Set to 1 for extra debug logging.
+ */
+#define DEBUG 0
 
 /**
  * Log error related to CURL operations.
@@ -524,9 +528,11 @@ parse_json_auditor (struct 
TALER_EXCHANGE_AuditorInformation *auditor,
                          NULL, NULL))
   {
     GNUNET_break_op (0);
+#if DEBUG
     json_dumpf (auditor_obj,
                 stderr,
                 JSON_INDENT (2));
+#endif
     return GNUNET_SYSERR;
   }
   auditor->auditor_url = GNUNET_strdup (auditor_url);
@@ -790,9 +796,11 @@ decode_keys_json (const json_t *resp_obj,
     GNUNET_break_op (0);
     return GNUNET_SYSERR;
   }
+#if DEBUG
   json_dumpf (resp_obj,
               stderr,
               JSON_INDENT (2));
+#endif
   /* check the version */
   {
     const char *ver;
diff --git a/src/lib/exchange_api_management_get_keys.c 
b/src/lib/exchange_api_management_get_keys.c
index 7d0c5a9e..050dae95 100644
--- a/src/lib/exchange_api_management_get_keys.c
+++ b/src/lib/exchange_api_management_get_keys.c
@@ -28,6 +28,12 @@
 #include "taler_crypto_lib.h"
 #include "taler_json_lib.h"
 
+/**
+ * Set to 1 for extra debug logging.
+ */
+#define DEBUG 0
+
+
 /**
  * @brief Handle for a GET /management/keys request.
  */
@@ -196,9 +202,11 @@ handle_ok (struct TALER_EXCHANGE_ManagementGetKeysHandle 
*gh,
                            NULL, NULL))
     {
       GNUNET_break_op (0);
+#if DEBUG
       json_dumpf (j,
                   stderr,
                   JSON_INDENT (2));
+#endif
       ok = false;
       break;
     }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]