]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
logging: remove QVERBOSE in favor of kr_log_q
authorTomas Krizek <tomas.krizek@nic.cz>
Tue, 9 Nov 2021 15:06:25 +0000 (16:06 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 21 Dec 2021 14:02:08 +0000 (15:02 +0100)
17 files changed:
daemon/worker.c
daemon/zimport.c
lib/cache/impl.h
lib/dnssec.c
lib/layer.h
lib/layer/iterate.c
lib/layer/validate.c
lib/resolve.c
lib/rplan.c
lib/selection.c
lib/selection_forward.c
lib/selection_iter.c
lib/utils.c
lib/zonecut.c
modules/cookies/cookiemonster.c
modules/hints/hints.c
modules/stats/stats.c

index c8bceffd17cf0649d778fbbf2d48d579674fa508..ed79788d4518d425db2f13df29ac302353d7d233 100644 (file)
@@ -51,7 +51,7 @@
 #define MAX_PIPELINED 100
 #endif
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, WORKER, __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q(qry, WORKER, __VA_ARGS__)
 
 /** Client request state. */
 struct request_ctx
index df25ae17ec8422701b7938267dca25f4feb227e2..a07b59c76b029a2b031b7a04acf290ac24afd301 100644 (file)
@@ -47,7 +47,7 @@
 #include "lib/generic/map.h"
 #include "lib/generic/array.h"
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, ZIMPORT, __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q(qry, ZIMPORT, __VA_ARGS__)
 
 /* Pause between parse and import stages, milliseconds.
  * See comment in zi_zone_import() */
index 7887341d4e4a329561cbb5997c0e38dfe04c7fbe..a670281e38e89134f4e816ad345824b02beb7c38 100644 (file)
@@ -417,7 +417,7 @@ int nsec3_src_synth(struct key *k, struct answer *ans, const knot_dname_t *clenc
 
 
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE((qry), CACHE,  ## __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q((qry), CACHE,  ## __VA_ARGS__)
 #define WITH_VERBOSE(qry) if (kr_log_is_debug_qry(CACHE, (qry)))
 
 /** Shorthand for operations on cache backend */
index 43ba201614695e16b2a88c98a8aa2b676cd515f0..2c5d19763586b893e13fed7ba459c2e9fb1cff1c 100644 (file)
@@ -153,7 +153,7 @@ static bool trim_ttl(knot_rrset_t *rrs, const knot_rdata_t *sig,
        if (kr_log_is_debug_qry(VALIDATOR, log_qry)) {
                auto_free char *name_str = kr_dname_text(rrs->owner),
                                *type_str = kr_rrtype_text(rrs->type);
-               QRVERBOSE(log_qry, VALIDATOR, "trimming TTL of %s %s: %d -> %d\n",
+               kr_log_q(log_qry, VALIDATOR, "trimming TTL of %s %s: %d -> %d\n",
                        name_str, type_str, (int)rrs->ttl, (int)ttl_max);
        }
        rrs->ttl = ttl_max;
index 0d228c81b425adbbdf15381d965ca4f803861591..1e7d112c908ea5e659365ba33150dfb68a933756 100644 (file)
@@ -8,8 +8,6 @@
 #include "lib/defines.h"
 #include "lib/utils.h"
 
-#define QRVERBOSE kr_log_q // TODO: perhaps eliminate
-
 /** Layer processing states.  Only one value at a time (but see TODO).
  *
  *  Each state represents the state machine transition,
index 34113218d8fa8d39eab04e0f438d632ceaca286d..7806d996e371d847e3fcdcd16964694aac2fda48 100644 (file)
@@ -32,8 +32,8 @@
 #include "lib/module.h"
 #include "lib/dnssec/ta.h"
 
-#define VERBOSE_MSG(...) QRVERBOSE(req->current_query, ITERATOR, __VA_ARGS__)
-#define QVERBOSE_MSG(qry, ...) QRVERBOSE(qry, ITERATOR, __VA_ARGS__)
+#define VERBOSE_MSG(...) kr_log_q(req->current_query, ITERATOR, __VA_ARGS__)
+#define QVERBOSE_MSG(qry, ...) kr_log_q(qry, ITERATOR, __VA_ARGS__)
 #define WITH_VERBOSE(qry) if (kr_log_is_debug_qry(ITERATOR, (qry)))
 
 /* Iterator often walks through packet section, this is an abstraction. */
index bdb2368f0fb2591ff8898db34a6186dc79bbe1f7..aa1715e1b7b8d24dc83bf9e79a646e163ad38a35 100644 (file)
@@ -25,7 +25,7 @@
 #include "lib/module.h"
 #include "lib/selection.h"
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, VALIDATOR, __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q(qry, VALIDATOR, __VA_ARGS__)
 
 #define MAX_REVALIDATION_CNT 2
 
index 12cb14a169fea867a553507fcbf69c8784ade417..8897afa26ad24b4cb95600dc7590fef19cae6967 100644 (file)
@@ -26,7 +26,7 @@
 #define KNOT_EDNS_OPTION_COOKIE 10
 #endif /* ENABLE_COOKIES */
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE((qry), RESOLVER,  __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q((qry), RESOLVER,  __VA_ARGS__)
 
 bool kr_rank_check(uint8_t rank)
 {
index 5f5904bad2183b1942bbe195b375fc277eec1bd6..3df5e1bd9ee0d2148ccdc960787d89a388f54e25 100644 (file)
@@ -11,7 +11,7 @@
 #include "lib/defines.h"
 #include "lib/layer.h"
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, PLAN,  __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q(qry, PLAN,  __VA_ARGS__)
 
 inline static unsigned char chars_or(const unsigned char a, const unsigned char b)
 {
index 8e737fc9323ab3b73b6b263393179dccd081b8b1..a26c42da597f91980a70f0fa4b7f7d09fe937de9 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "lib/utils.h"
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE((qry), SELECTION, __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q((qry), SELECTION, __VA_ARGS__)
 
 #define DEFAULT_TIMEOUT 400
 #define MAX_TIMEOUT 10000
index 0a97da92948988b86d574fc9df56a3837aa58fc9..baab3abd51b1a0e077080f104a02e92354aa237a 100644 (file)
@@ -5,7 +5,7 @@
 #include "lib/selection_forward.h"
 #include "lib/resolve.h"
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE((qry), SELECTION, __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q((qry), SELECTION, __VA_ARGS__)
 
 #define FORWARDING_TIMEOUT 2000
 
index 2e70265be24ad93f11bd9c5a35304ab9c8590211..eff4c0b9c51d17f964f4dd69a447d8dd26f5e864 100644 (file)
@@ -10,7 +10,7 @@
 #include "lib/zonecut.h"
 #include "lib/resolve.h"
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE((qry), SELECTION, __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q((qry), SELECTION, __VA_ARGS__)
 
 /// To be held per query and locally.  Allocations are in the kr_request's mempool.
 struct iter_local_state {
index efc1e5bcd5d2cceac410e219daabbd6fd4a2d489..4b6ff55894a180ed8a330ebc781efa72bfb16a62 100644 (file)
@@ -770,7 +770,7 @@ int kr_ranked_rrarray_finalize(ranked_rr_array_t *array, uint32_t qry_uid, knot_
                                if (knot_rdata_cmp(ra->at[i], ra->at[i + 1]) == 0) {
                                        ra->at[i] = NULL;
                                        ++dup_count;
-                                       QRVERBOSE(NULL, ITERATOR, "deleted duplicate RR\n");
+                                       kr_log_q(NULL, ITERATOR, "deleted duplicate RR\n");
                                }
                        }
                        /* Prepare rdataset, except rdata contents. */
index 9f0a86604a4a69b127546999d9ec50eb34320374..774789fca6a0965b8d536f2f46595cd270b7a0a1 100644 (file)
@@ -15,7 +15,7 @@
 #include <libknot/packet/wire.h>
 #include <libknot/rrtype/rdname.h>
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, ZCUT, __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q(qry, ZCUT, __VA_ARGS__)
 
 /** Information for one NS name + address type. */
 typedef enum {
index f118b7e7569b2581f84f439d59844d9bc58d2e00..af4655b4457e7a124ef954b1c347545eecb0577b 100644 (file)
@@ -20,7 +20,7 @@
 #include "lib/rplan.h"
 #include "modules/cookies/cookiemonster.h"
 
-#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, COOKIES, __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q(qry, COOKIES, __VA_ARGS__)
 
 /**
  * Obtain address from query/response context if if can be obtained.
index 737b7683fc7cfeb6f19c5dbc9d03bd58026978c8..eb79a3d67e37744c4f88cc7613bd2c0da3ab3162 100644 (file)
@@ -25,7 +25,7 @@
 #include <math.h>
 
 /* Defaults */
-#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, HINT,  __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q(qry, HINT,  __VA_ARGS__)
 #define ERR_MSG(...) kr_log_error(HINT, "[     ]" __VA_ARGS__)
 
 struct hints_data {
index 3b69cd1f1f8d417e57ab1ba6b26a67dfd566776e..edb972e2e32c1b2c7b317e3e096aced8c297bdaa 100644 (file)
@@ -25,7 +25,7 @@
 #include "lib/resolve.h"
 
 /* Defaults */
-#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, STATISTICS,  __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) kr_log_q(qry, STATISTICS,  __VA_ARGS__)
 #define FREQUENT_PSAMPLE  10 /* Sampling rate, 1 in N */
 #ifdef LRU_REP_SIZE
  #define FREQUENT_COUNT LRU_REP_SIZE /* Size of frequent tables */