diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-12-20 20:05:48 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-12-20 20:05:48 +0100 |
commit | 95333b422380ba955d61a074f3788b958283a427 (patch) | |
tree | 0135eb75c984940380cab5d9f28b690e5e02a7c1 /src/lib/exchange_api_handle.c | |
parent | 4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993 (diff) | |
download | exchange-95333b422380ba955d61a074f3788b958283a427.tar.xz |
only log with json_dumpf() if explicitly compiled via DEBUG #define
Diffstat (limited to 'src/lib/exchange_api_handle.c')
-rw-r--r-- | src/lib/exchange_api_handle.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index f45025d0f..df92ba4db 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; |