diff --git a/daemon/main.c b/daemon/main.c index be70ac8999a244174274c44a9521f3ec3f5a6a53..33b7d7bb1c5d4a37a36182fabcd84088cae9cd38 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -130,11 +130,7 @@ static void help(int argc, char *argv[]) " -c, --config=[path] Config file path (relative to [rundir]) (default: config).\n" " -n, --noninteractive Don't start the read-eval-print loop for stdin+stdout.\n" " -q, --quiet No command prompt in interactive mode.\n" - " -v, --verbose Run in verbose mode." -#ifdef NOVERBOSELOG - " (Recompile without -DNOVERBOSELOG to activate.)" -#endif - "\n" + " -v, --verbose Run in verbose mode.\n" " -V, --version Print version of the server.\n" " -h, --help Print help and usage.\n" "Options:\n" diff --git a/daemon/worker.c b/daemon/worker.c index 370a5ee9b0c3b7f0d354754fececc09cc3d92ba4..b44663d8de139c1bf167de4bf58353e1fd404340 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -1651,7 +1651,6 @@ static int qr_task_step(struct qr_task *task, if (unlikely(++task->iter_count > KR_ITER_LIMIT || task->timeouts >= KR_TIMEOUT_LIMIT)) { - #ifndef NOVERBOSELOG struct kr_rplan *rplan = &req->rplan; struct kr_query *last = kr_rplan_last(rplan); if (task->iter_count > KR_ITER_LIMIT) { @@ -1660,7 +1659,6 @@ static int qr_task_step(struct qr_task *task, if (task->timeouts >= KR_TIMEOUT_LIMIT) { VERBOSE_MSG(last, "canceling query due to exceeded timeout retries limit of %d\n", KR_TIMEOUT_LIMIT); } - #endif return qr_task_finalize(task, KR_STATE_FAIL); } diff --git a/doc/upgrading.rst b/doc/upgrading.rst index 497b22255e297b96b0be1fd3cf47dbb683efd69a..ae2394d399319de1b0b641120ffc2a433f773aa2 100644 --- a/doc/upgrading.rst +++ b/doc/upgrading.rst @@ -34,6 +34,11 @@ Configuration file * ``kind='doh'`` in :func:`net.listen` was renamed to ``kind='doh_legacy'``. It is recommended to switch to the new DoH implementation with ``kind='doh2'``. +Packagers & Developers +---------------------- + +* meson option ``verbose_log`` was removed. + 5.2 to 5.3 ========== diff --git a/lib/layer.h b/lib/layer.h index 638124407d9c0a2357cc5ca8243444c2b0d78624..40e62c7d4ebc4d56e4766694aa6dfff2c8ab7702 100644 --- a/lib/layer.h +++ b/lib/layer.h @@ -8,21 +8,17 @@ #include "lib/defines.h" #include "lib/utils.h" -#ifdef NOVERBOSELOG - #define QRVERBOSE(query, cls, ...) -#else - /** Print a debug message related to resolution. - * \param _query associated kr_query, may be NULL - * \param _cls identifying string, typically of length exactly four (padded) - * \param ... printf-compatible list of parameters - */ - #define QRVERBOSE(_query, _cls, ...) do { \ - const struct kr_query *_qry = (_query); \ - if (VERBOSE_STATUS || kr_log_qtrace_enabled(_qry)) { \ - kr_log_q(_qry, (_cls), __VA_ARGS__); \ - } \ - } while (false) -#endif +/** Print a debug message related to resolution. + * \param _query associated kr_query, may be NULL + * \param _cls identifying string, typically of length exactly four (padded) + * \param ... printf-compatible list of parameters + */ +#define QRVERBOSE(_query, _cls, ...) do { \ + const struct kr_query *_qry = (_query); \ + if (VERBOSE_STATUS || kr_log_qtrace_enabled(_qry)) { \ + kr_log_q(_qry, (_cls), __VA_ARGS__); \ + } \ +} while (false) /** Layer processing states. Only one value at a time (but see TODO). * diff --git a/lib/layer/iterate.c b/lib/layer/iterate.c index efdcc73c494674162f6058a01baba2ee3b9b52ac..7be969b8f2452294cd40593e866a28667b608f63 100644 --- a/lib/layer/iterate.c +++ b/lib/layer/iterate.c @@ -1064,9 +1064,9 @@ static int resolve(kr_layer_t *ctx, knot_pkt_t *pkt) * The most important part is to check for spoofing: is_paired_to_query() */ query->flags.PKT_IS_SANE = true; -#ifndef NOVERBOSELOG - const knot_lookup_t *rcode = knot_lookup_by_id(knot_rcode_names, knot_wire_get_rcode(pkt->wire)); -#endif + const knot_lookup_t *rcode = NULL; + if (KR_LOG_LEVEL_IS(LOG_DEBUG)) + rcode = knot_lookup_by_id(knot_rcode_names, knot_wire_get_rcode(pkt->wire)); // We can't return directly from the switch because we have to give feedback to server selection first int ret = 0; diff --git a/lib/resolve.c b/lib/resolve.c index d3fa992a8a69c785f67ef2bd07857edb2efd775a..dfb6d6b6f60263485c787caa8b9fd54a67c5f417 100644 --- a/lib/resolve.c +++ b/lib/resolve.c @@ -1570,12 +1570,10 @@ int kr_resolve_finish(struct kr_request *request, int state) ITERATE_LAYERS(request, NULL, finish); -#ifndef NOVERBOSELOG struct kr_rplan *rplan = &request->rplan; struct kr_query *last = kr_rplan_last(rplan); VERBOSE_MSG(last, "finished in state: %d, queries: %zu, mempool: %zu B\n", - request->state, rplan->resolved.len, (size_t) mp_total_size(request->pool.ctx)); -#endif + request->state, rplan->resolved.len, (size_t) mp_total_size(request->pool.ctx)); /* Trace request finish */ if (request->trace_finish) { diff --git a/meson.build b/meson.build index c20d132e46dae8c33f92987e77ed0d140abe2f51..9f7849f287771909e2e84677f20f74f689cf7d7e 100644 --- a/meson.build +++ b/meson.build @@ -82,7 +82,6 @@ else endif ## Additional options -verbose_log = get_option('verbose_log') == 'enabled' or get_option('verbose_log') == 'auto' user = get_option('user') group = get_option('group') @@ -173,7 +172,6 @@ conf_data.set_quoted('libzscanner_SONAME', conf_data.set_quoted('libknot_SONAME', libknot.get_pkgconfig_variable('soname')) conf_data.set('ENABLE_LIBSYSTEMD', libsystemd.found().to_int()) -conf_data.set('NOVERBOSELOG', not verbose_log) conf_data.set('ENABLE_SENDMMSG', sendmmsg.to_int()) conf_data.set('ENABLE_XDP', xdp.to_int()) conf_data.set('ENABLE_CAP_NG', capng.found().to_int()) diff --git a/meson_options.txt b/meson_options.txt index 572cd643d93605074af931c614f007e73136c02f..0e24dc4c893fd0a505a0df2a67bd56c2730230ad 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -51,18 +51,6 @@ option( description: 'installs DNSSEC TA to keyfile_default location', ) -option( - 'verbose_log', - type: 'combo', - choices: [ - 'auto', - 'enabled', - 'disabled', - ], - value: 'auto', - description: 'support verbose logging', -) - option( 'user', type: 'string',