From: Vladimír Čunát Date: Mon, 10 Apr 2017 11:14:05 +0000 (+0200) Subject: rrcache: put more info into --verbose messages X-Git-Tag: v1.3.0~23^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1bc70b4a5346b130f7d7eedc6bd3c6d6f695a2a;p=thirdparty%2Fknot-resolver.git rrcache: put more info into --verbose messages Especially when stashing into the cache, it was unclear which RRset was being referred to. Let's add type and owner name. --- diff --git a/lib/layer/rrcache.c b/lib/layer/rrcache.c index c5a12a453..74ce75a42 100644 --- a/lib/layer/rrcache.c +++ b/lib/layer/rrcache.c @@ -75,7 +75,11 @@ static int loot_rr(struct kr_cache *cache, knot_pkt_t *pkt, const knot_dname_t * return ret; } - VERBOSE_MSG(qry, "=> rank: 0%0.2o, lowest 0%0.2o\n", *rank, lowest_rank); + WITH_VERBOSE { + VERBOSE_MSG(qry, "=> rank: 0%0.2o, lowest 0%0.2o, ", *rank, lowest_rank); + kr_rrtype_print(rrtype, "", " "); + kr_dname_print(name, "", "\n"); + } if (*rank < lowest_rank) { return kr_error(ENOENT); @@ -284,7 +288,11 @@ static int commit_rr(const char *key, void *val, void *data) } } - VERBOSE_MSG(baton->qry, "=> stashing rank: 0%0.2o\n", rank); + WITH_VERBOSE { + VERBOSE_MSG(baton->qry, "=> stashing rank: 0%0.2o, ", rank); + kr_rrtype_print(rr->type, "", " "); + kr_dname_print(rr->owner, "", "\n"); + } uint8_t flags = KR_CACHE_FLAG_NONE; if (kr_rank_test(rank, KR_RANK_AUTH)) {