Commit 4582521e authored by Tomas Krizek's avatar Tomas Krizek

meson: add verbose_log option

parent c7c37394
......@@ -562,8 +562,10 @@ The daemon features a CLI interface, type ``help()`` to see the list of availabl
Verbose output
--------------
If the verbose logging is compiled in, i.e. not turned off by ``-DNOVERBOSELOG``, you can turn on verbose tracing of server operation with the ``-v`` option.
You can also toggle it on runtime with ``verbose(true|false)`` command.
If the verbose logging is compiled in, i.e. not turned off by
``verbose_log=disabled``, you can turn on verbose tracing of server operation
with the ``-v`` option. You can also toggle it on runtime with
``verbose(true|false)`` command.
.. code-block:: bash
......
......@@ -157,6 +157,7 @@ options:
"``managed_ta``", "*feature*", "auto-manage DNSSEC trust anchors (RFC 5011)"
"``root_hints``", "*string*", "built-in path to root.hints file"
"``install_kresd_conf``", "*feature*", "install default config file"
"``verbose_log``", "*feature*", "support verbose logging"
"``user``", "*string*", "user which is used for running kresd"
"``group``", "*string*", "group which is used for running kresd"
"``systemd_unit_files``", "``disabled``/``enabled``/``nosocket``", "installs
......
......@@ -16,6 +16,7 @@
#pragma once
#include "kresconfig.h"
#include "lib/defines.h"
#include "lib/utils.h"
......
......@@ -36,6 +36,7 @@
#include <libknot/rrtype/rdname.h>
#include <libknot/rrtype/rrsig.h>
#include "kresconfig.h"
#include "lib/layer/iterate.h"
#include "lib/resolve.h"
#include "lib/rplan.h"
......
......@@ -23,6 +23,7 @@
#include <libknot/rrtype/rdname.h>
#include <libknot/descriptor.h>
#include <ucw/mempool.h>
#include "kresconfig.h"
#include "lib/resolve.h"
#include "lib/layer.h"
#include "lib/rplan.h"
......@@ -810,7 +811,7 @@ static void update_nslist_rtt(struct kr_context *ctx, struct kr_query *qry, cons
/* Calculate total resolution time from the time the query was generated. */
uint64_t elapsed = kr_now() - qry->timestamp_mono;
elapsed = elapsed > UINT_MAX ? UINT_MAX : elapsed;
/* NSs in the preference list prior to the one who responded will be penalised
* with the RETRY timer interval. This is because we know they didn't respond
* for N retries, so their RTT must be at least N * RETRY.
......@@ -1376,7 +1377,7 @@ int kr_resolve_produce(struct kr_request *request, struct sockaddr **dst, int *t
ITERATE_LAYERS(request, qry, reset);
return kr_rplan_empty(rplan) ? KR_STATE_DONE : KR_STATE_PRODUCE;
}
/* This query has RD=0 or is ANY, stop here. */
if (qry->stype == KNOT_RRTYPE_ANY ||
......
......@@ -31,6 +31,7 @@
#include <libknot/version.h>
#include <uv.h>
#include "kresconfig.h"
#include "lib/defines.h"
#include "lib/utils.h"
#include "lib/generic/array.h"
......
......@@ -31,6 +31,7 @@
#include <libknot/rrset.h>
#include <libknot/rrtype/rrsig.h>
#include "kresconfig.h"
#include "lib/generic/array.h"
#include "lib/defines.h"
......
......@@ -71,6 +71,9 @@ else
install_root_hints = false
endif
## Verbose log
opt_verbose_log = get_option('verbose_log')
verbose_log = opt_verbose_log.enabled() or opt_verbose_log.auto()
## User/Group
user = get_option('user')
......@@ -85,7 +88,6 @@ if systemd_unit_files == 'enabled' and not libsystemd.found()
endif
message('---------------------------')
## Compiler args
c_args = [
'-D_GNU_SOURCE',
......@@ -138,6 +140,7 @@ conf_data.set_quoted('libzscanner_SONAME',
conf_data.set_quoted('libknot_SONAME',
libknot.get_pkgconfig_variable('soname'))
conf_data.set('HAS_SYSTEMD', libsystemd.found())
conf_data.set('NOVERBOSELOG', not verbose_log)
kresconfig = configure_file(
output: 'kresconfig.h',
......
......@@ -27,6 +27,13 @@ option(
description: 'creates kresd.conf in config directory',
)
option(
'verbose_log',
type: 'feature',
value: 'enabled',
description: 'support verbose logging',
)
option(
'user',
type: 'string',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment