From d012059654311a8eebc148d6f91f98fe732e25ea Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 13 Jan 2021 19:49:42 +0100 Subject: improve logging --- src/pq/pq_result_helper.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index 205eb8fce..204ccee72 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c @@ -170,6 +170,9 @@ extract_fixed_blob (void *cls, if (fnum < 0) { GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Result does not have field %s\n", + fname); return GNUNET_SYSERR; } if (PQgetisnull (result, @@ -189,9 +192,9 @@ extract_fixed_blob (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Expected %u bytes for field `%s', got %u\n", - *dst_size, + (unsigned int) *dst_size, fname, - len); + (unsigned int) len); GNUNET_break (0); return GNUNET_SYSERR; } @@ -866,6 +869,9 @@ extract_uint64 (void *cls, fname); if (fnum < 0) { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Field %s missing in result\n", + fname); GNUNET_break (0); return GNUNET_SYSERR; } -- cgit v1.2.3