* === Basic logging functions (see <<log:,Logging>> and <ucw/log.h> for more)
***/
-#define DBG(x,y...) do { } while(0)
+#define DBG(x, ...) do { } while(0)
#define DBG_SPOT do { } while(0)
#define ASSERT(x)
/** @internal Debugging facility. */
#ifdef DEBUG
-#define DEBUG_MSG(fmt...) kr_log_verbose("[tls] " fmt)
+#define DEBUG_MSG(...) kr_log_verbose("[tls] " __VA_ARGS__)
#else
-#define DEBUG_MSG(fmt...)
+#define DEBUG_MSG(...)
#endif
struct async_write_ctx {
#define MAX_PIPELINED 100
#endif
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "wrkr", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, "wrkr", __VA_ARGS__)
/** Client request state. */
struct request_ctx
#include "lib/generic/map.h"
#include "lib/generic/array.h"
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "zimport", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, "zimport", __VA_ARGS__)
/* Pause between parse and import stages, milliseconds.
* See comment in zi_zone_import() */
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE((qry), "cach", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE((qry), "cach", ## __VA_ARGS__)
/** Shorthand for operations on cache backend */
#define cache_op(cache, op, ...) (cache)->api->op((cache)->db, ## __VA_ARGS__)
#include "lib/module.h"
#include "lib/dnssec/ta.h"
-#define VERBOSE_MSG(fmt...) QRVERBOSE(req->current_query, "iter", fmt)
-#define QVERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "iter", fmt)
+#define VERBOSE_MSG(...) QRVERBOSE(req->current_query, "iter", __VA_ARGS__)
+#define QVERBOSE_MSG(qry, ...) QRVERBOSE(qry, "iter", __VA_ARGS__)
/* Iterator often walks through packet section, this is an abstraction. */
typedef int (*rr_callback_t)(const knot_rrset_t *, unsigned, struct kr_request *);
#include "lib/defines.h"
#include "lib/module.h"
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "vldr", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, "vldr", __VA_ARGS__)
#define MAX_REVALIDATION_CNT 2
#define KNOT_EDNS_OPTION_COOKIE 10
#endif /* defined(ENABLE_COOKIES) */
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE((qry), "resl", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE((qry), "resl", __VA_ARGS__)
bool kr_rank_check(uint8_t rank)
{
#include "lib/defines.h"
#include "lib/layer.h"
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "plan", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, "plan", __VA_ARGS__)
#define QUERY_PROVIDES(q, name, cls, type) \
((q)->sclass == (cls) && (q)->stype == type && knot_dname_is_equal((q)->sname, name))
/** @brief Callback for request logging handler. */
typedef void (*trace_log_f)(const struct kr_query *query, const char *source, const char *msg);
-#define kr_log_info(fmt, ...) do { printf((fmt), ## __VA_ARGS__); fflush(stdout); } while(0)
-#define kr_log_error(fmt, ...) fprintf(stderr, (fmt), ## __VA_ARGS__)
+#define kr_log_info(...) do { printf(__VA_ARGS__); fflush(stdout); } while(0)
+#define kr_log_error(...) fprintf(stderr, ## __VA_ARGS__)
/* Always export these, but override direct calls by macros conditionally. */
/** Whether in --verbose mode. Only use this for reading. */
#include <libknot/packet/wire.h>
#include <libknot/rrtype/rdname.h>
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "zcut", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, "zcut", __VA_ARGS__)
/** Information for one NS name + address type. */
typedef enum {
#include "lib/rplan.h"
#include "modules/cookies/cookiemonster.h"
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "cookies", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, "cookies", __VA_ARGS__)
/**
* Obtain address from query/response context if if can be obtained.
#include "lib/layer.h"
/* Defaults */
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "hint", fmt)
-#define ERR_MSG(fmt, ...) kr_log_error("[ ][hint] " fmt, ## __VA_ARGS__)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, "hint", __VA_ARGS__)
+#define ERR_MSG(...) kr_log_error("[ ][hint] " __VA_ARGS__)
struct hints_data {
struct kr_zonecut hints;
#endif
/* Defaults */
-#define VERBOSE_MSG(qry, fmt...) QRVERBOSE(qry, "stat", fmt)
+#define VERBOSE_MSG(qry, ...) QRVERBOSE(qry, "stat", __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 */