]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove logging context (isc_log_t) from the public namespace
authorOndřej Surý <ondrej@isc.org>
Tue, 13 Aug 2024 16:20:26 +0000 (18:20 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 20 Aug 2024 12:50:39 +0000 (12:50 +0000)
Now that the logging uses single global context, remove the isc_log_t
from the public namespace.

129 files changed:
bin/check/check-tool.c
bin/check/check-tool.h
bin/check/named-checkconf.c
bin/check/named-checkzone.c
bin/delv/delv.c
bin/dig/dighost.c
bin/dnssec/dnssec-cds.c
bin/dnssec/dnssec-dsfromkey.c
bin/dnssec/dnssec-importkey.c
bin/dnssec/dnssec-keyfromlabel.c
bin/dnssec/dnssec-keygen.c
bin/dnssec/dnssec-ksr.c
bin/dnssec/dnssec-settime.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssec-verify.c
bin/dnssec/dnssectool.c
bin/dnssec/dnssectool.h
bin/named/config.c
bin/named/control.c
bin/named/controlconf.c
bin/named/dlz_dlopen_driver.c
bin/named/geoip.c
bin/named/include/named/globals.h
bin/named/include/named/log.h
bin/named/log.c
bin/named/logconf.c
bin/named/main.c
bin/named/os.c
bin/named/server.c
bin/named/statschannel.c
bin/named/tkeyconf.c
bin/named/transportconf.c
bin/named/tsigconf.c
bin/named/zoneconf.c
bin/nsupdate/nsupdate.c
bin/plugins/filter-a.c
bin/plugins/filter-aaaa.c
bin/rndc/rndc.c
bin/tests/system/dyndb/driver/log.c
bin/tests/system/hooks/driver/test-async.c
bin/tests/system/makejournal.c
bin/tests/system/rsabigexponent/bigkey.c
bin/tools/named-journalprint.c
doc/dev/dev.md
doc/misc/cfg_test.c
lib/dns/adb.c
lib/dns/callbacks.c
lib/dns/catz.c
lib/dns/db.c
lib/dns/diff.c
lib/dns/dispatch.c
lib/dns/dlz.c
lib/dns/dnsrps.c
lib/dns/dnssec.c
lib/dns/dnstap.c
lib/dns/dst_parse.c
lib/dns/dyndb.c
lib/dns/gssapictx.c
lib/dns/hmac_link.c
lib/dns/include/dns/dyndb.h
lib/dns/include/dns/log.h
lib/dns/include/dns/resolver.h
lib/dns/journal.c
lib/dns/keymgr.c
lib/dns/keystore.c
lib/dns/log.c
lib/dns/masterdump.c
lib/dns/message.c
lib/dns/nta.c
lib/dns/qp.c
lib/dns/qpcache.c
lib/dns/qpzone.c
lib/dns/rbt-zonedb.c
lib/dns/rbtdb.c
lib/dns/request.c
lib/dns/resolver.c
lib/dns/rootns.c
lib/dns/rpz.c
lib/dns/rrl.c
lib/dns/sdlz.c
lib/dns/ssu.c
lib/dns/ssu_external.c
lib/dns/tkey.c
lib/dns/tsig.c
lib/dns/update.c
lib/dns/validator.c
lib/dns/view.c
lib/dns/xfrin.c
lib/dns/zone.c
lib/dns/zt.c
lib/isc/backtrace.c
lib/isc/file.c
lib/isc/include/isc/backtrace.h
lib/isc/include/isc/log.h
lib/isc/include/isc/types.h
lib/isc/log.c
lib/isc/loop.c
lib/isc/net.c
lib/isc/netmgr/http.c
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/tls.c
lib/isccfg/aclconf.c
lib/isccfg/check.c
lib/isccfg/include/isccfg/aclconf.h
lib/isccfg/include/isccfg/cfg.h
lib/isccfg/include/isccfg/check.h
lib/isccfg/include/isccfg/grammar.h
lib/isccfg/include/isccfg/kaspconf.h
lib/isccfg/include/isccfg/log.h
lib/isccfg/kaspconf.c
lib/isccfg/log.c
lib/isccfg/parser.c
lib/ns/client.c
lib/ns/hooks.c
lib/ns/include/ns/hooks.h
lib/ns/include/ns/log.h
lib/ns/interfacemgr.c
lib/ns/listenlist.c
lib/ns/log.c
lib/ns/query.c
lib/ns/update.c
lib/ns/xfrout.c
tests/bench/qpmulti.c
tests/dns/qpmulti_test.c
tests/include/tests/isc.h
tests/isccfg/duration_test.c
tests/isccfg/parser_test.c
tests/libtest/isc.c

index 4e0b96afeac06c1335ec7f7bc8f2f785e1caa9b6..503ecb8f42883e3a2a90de92e169af8abca950a7 100644 (file)
@@ -549,17 +549,16 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
 }
 
 isc_result_t
-setup_logging(isc_mem_t *mctx ISC_ATTR_UNUSED, FILE *errout, isc_log_t **logp) {
+setup_logging(FILE *errout) {
        isc_logdestination_t destination;
        isc_logconfig_t *logconfig = NULL;
-       isc_log_t *log = NULL;
 
-       isc_log_registercategories(log, categories);
-       dns_log_init(log);
-       cfg_log_init(log);
-       ns_log_init(log);
+       isc_log_registercategories(categories);
+       dns_log_init();
+       cfg_log_init();
+       ns_log_init();
 
-       logconfig = isc_logconfig_get(log);
+       logconfig = isc_logconfig_get();
        destination.file.stream = errout;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
@@ -570,7 +569,6 @@ setup_logging(isc_mem_t *mctx ISC_ATTR_UNUSED, FILE *errout, isc_log_t **logp) {
        RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr", NULL, NULL) ==
                      ISC_R_SUCCESS);
 
-       *logp = log;
        return (ISC_R_SUCCESS);
 }
 
index 64ac9e7917d329cb8a00974b8082fb1f7debdd9d..b8da20324e432c7db24ebe66a3e7f54355e90f0b 100644 (file)
@@ -29,7 +29,7 @@
 ISC_LANG_BEGINDECLS
 
 isc_result_t
-setup_logging(isc_mem_t *mctx, FILE *errout, isc_log_t **logp);
+setup_logging(FILE *errout);
 
 isc_result_t
 load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
index 495902e648740784dd581a34a2989903ecd037a0..3ac3c5e1d7dabf0c0ea7570fff35ed219b701fd2 100644 (file)
@@ -44,8 +44,6 @@
 
 static const char *program = "named-checkconf";
 
-isc_log_t *logc = NULL;
-
 #define CHECK(r)                             \
        do {                                 \
                result = (r);                \
@@ -83,7 +81,7 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
        directory = cfg_obj_asstring(obj);
        result = isc_dir_chdir(directory);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, logc, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "change directory to '%s' failed: %s\n", directory,
                            isc_result_totext(result));
                return (result);
@@ -725,9 +723,9 @@ main(int argc, char **argv) {
                conffile = NAMED_CONFFILE;
        }
 
-       CHECK(setup_logging(mctx, stdout, &logc));
+       CHECK(setup_logging(stdout));
 
-       CHECK(cfg_parser_create(mctx, logc, &parser));
+       CHECK(cfg_parser_create(mctx, &parser));
 
        if (nodeprecate) {
                cfg_parser_setflags(parser, CFG_PCTX_NODEPRECATED, true);
@@ -735,7 +733,7 @@ main(int argc, char **argv) {
        cfg_parser_setcallback(parser, directory_callback, NULL);
 
        CHECK(cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config));
-       CHECK(isccfg_check_namedconf(config, checkflags, logc, mctx));
+       CHECK(isccfg_check_namedconf(config, checkflags, mctx));
        if (load_zones || list_zones) {
                CHECK(load_zones_fromconfig(config, mctx, list_zones));
        }
index f637b4a5cba8017ec724e8e48e4616e0cfced70c..598a524730d93fb5832be35513e60ac452c46a76 100644 (file)
@@ -95,7 +95,6 @@ main(int argc, char **argv) {
        int c;
        char *origin = NULL;
        const char *filename = NULL;
-       isc_log_t *lctx = NULL;
        isc_result_t result;
        char classname_in[] = "IN";
        char *classname = classname_in;
@@ -525,8 +524,7 @@ main(int argc, char **argv) {
 
        isc_mem_create(&mctx);
        if (!quiet) {
-               RUNTIME_CHECK(setup_logging(mctx, errout, &lctx) ==
-                             ISC_R_SUCCESS);
+               RUNTIME_CHECK(setup_logging(errout) == ISC_R_SUCCESS);
        }
 
        origin = argv[isc_commandline_index++];
index 7e3bc57917ff13be3e600a099ef846e9492fde24..6627dd01bbcee7f3fe344ed0abc0df0c0f4d22a2 100644 (file)
@@ -94,7 +94,6 @@
 /* Variables used internally by delv. */
 char *progname = NULL;
 static isc_mem_t *mctx = NULL;
-static isc_log_t *lctx = NULL;
 static dns_view_t *view = NULL;
 static ns_server_t *sctx = NULL;
 static ns_interface_t *ifp = NULL;
@@ -301,14 +300,14 @@ delv_log(int level, const char *fmt, ...) {
        va_list ap;
        char msgbuf[2048];
 
-       if (!isc_log_wouldlog(lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
        va_start(ap, fmt);
 
        vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
-       isc_log_write(lctx, LOGCATEGORY_DEFAULT, LOGMODULE_DEFAULT, level, "%s",
+       isc_log_write(LOGCATEGORY_DEFAULT, LOGMODULE_DEFAULT, level, "%s",
                      msgbuf);
        va_end(ap);
 }
@@ -322,12 +321,12 @@ setup_logging(FILE *errout) {
        isc_logconfig_t *logconfig = NULL;
        int packetlevel = 10;
 
-       isc_log_registercategories(lctx, categories);
-       isc_log_registermodules(lctx, modules);
-       dns_log_init(lctx);
-       cfg_log_init(lctx);
+       isc_log_registercategories(categories);
+       isc_log_registermodules(modules);
+       dns_log_init();
+       cfg_log_init();
 
-       logconfig = isc_logconfig_get(lctx);
+       logconfig = isc_logconfig_get();
        destination.file.stream = errout;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
@@ -336,7 +335,7 @@ setup_logging(FILE *errout) {
                              ISC_LOG_DYNAMIC, &destination,
                              ISC_LOG_PRINTPREFIX);
 
-       isc_log_setdebuglevel(lctx, loglevel);
+       isc_log_setdebuglevel(loglevel);
        isc_log_settag(logconfig, ";; ");
 
        result = isc_log_usechannel(logconfig, "stderr",
@@ -814,14 +813,14 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client, dns_view_t *toview) {
 
 cleanup:
        if (result == DST_R_NOCRYPTO) {
-               cfg_obj_log(key, lctx, ISC_LOG_ERROR, "no crypto support");
+               cfg_obj_log(key, ISC_LOG_ERROR, "no crypto support");
        } else if (result == DST_R_UNSUPPORTEDALG) {
-               cfg_obj_log(key, lctx, ISC_LOG_WARNING,
+               cfg_obj_log(key, ISC_LOG_WARNING,
                            "skipping trusted key '%s': %s", keynamestr,
                            isc_result_totext(result));
                result = ISC_R_SUCCESS;
        } else if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(key, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(key, ISC_LOG_ERROR,
                            "failed to add trusted key '%s': %s", keynamestr,
                            isc_result_totext(result));
                result = ISC_R_FAILURE;
@@ -876,7 +875,7 @@ setup_dnsseckeys(dns_client_t *client, dns_view_t *toview) {
                CHECK(convert_name(&afn, &anchor_name, trust_anchor));
        }
 
-       CHECK(cfg_parser_create(mctx, dns_lctx, &parser));
+       CHECK(cfg_parser_create(mctx, &parser));
 
        if (anchorfile != NULL) {
                if (access(anchorfile, R_OK) != 0) {
index 64c33d4906d4d43df6b549c24babf31b30d1365c..f3b5b11a6cf425e7889617947145e9c1a32eadde 100644 (file)
@@ -99,7 +99,6 @@ bool port_set = false;
 unsigned int timeout = 0;
 unsigned int extrabytes;
 isc_mem_t *mctx = NULL;
-isc_log_t *lctx = NULL;
 isc_nm_t *netmgr = NULL;
 isc_loopmgr_t *loopmgr = NULL;
 isc_loop_t *mainloop = NULL;
@@ -1096,7 +1095,7 @@ read_confkey(void) {
                return (ISC_R_FILENOTFOUND);
        }
 
-       result = cfg_parser_create(mctx, NULL, &pctx);
+       result = cfg_parser_create(mctx, &pctx);
        if (result != ISC_R_SUCCESS) {
                goto cleanup;
        }
@@ -1361,14 +1360,14 @@ setup_libs(void) {
 
        isc_managers_create(&mctx, 1, &loopmgr, &netmgr);
 
-       dns_log_init(lctx);
+       dns_log_init();
 
-       logconfig = isc_logconfig_get(lctx);
+       logconfig = isc_logconfig_get();
        result = isc_log_usechannel(logconfig, "default_debug", NULL, NULL);
 
        check_result(result, "isc_log_usechannel");
 
-       isc_log_setdebuglevel(lctx, 0);
+       isc_log_setdebuglevel(0);
 
        isc_mem_setname(mctx, "dig");
        mainloop = isc_loop_main(loopmgr);
index 86aeff0b11d70a5d1931be27f33a2a13a903161e..6e22896c109ce6960749b578455fc9612b4fc76e 100644 (file)
@@ -63,7 +63,6 @@ const char *program = "dnssec-cds";
 /*
  * Infrastructure
  */
-static isc_log_t *lctx = NULL;
 static isc_mem_t *mctx = NULL;
 
 /*
@@ -1070,9 +1069,6 @@ cleanup(void) {
                free_keytable(&new_key_tbl);
        }
        free_all_sets();
-       if (lctx != NULL) {
-               cleanup_logging(&lctx);
-       }
        if (mctx != NULL) {
                if (print_mem_stats && verbose > 10) {
                        isc_mem_stats(mctx, stdout);
@@ -1173,7 +1169,7 @@ main(int argc, char *argv[]) {
                dtype[0] = DNS_DSDIGEST_SHA256;
        }
 
-       setup_logging(mctx, &lctx);
+       setup_logging();
 
        if (ds_path == NULL) {
                fatal("missing -d DS pathname");
index 97f2a3780d65eb70cc359804cc1076b9715430ba..143a07e0e3da65a884e40c5aea82f1763c1f7948 100644 (file)
@@ -368,7 +368,6 @@ main(int argc, char **argv) {
        bool usekeyset = false;
        bool showall = false;
        isc_result_t result;
-       isc_log_t *log = NULL;
        dns_rdataset_t rdataset;
        dns_rdata_t rdata;
 
@@ -489,7 +488,7 @@ main(int argc, char **argv) {
                fatal("extraneous arguments");
        }
 
-       setup_logging(mctx, &log);
+       setup_logging();
 
        dns_rdataset_init(&rdataset);
 
@@ -542,7 +541,6 @@ main(int argc, char **argv) {
        if (dns_rdataset_isassociated(&rdataset)) {
                dns_rdataset_disassociate(&rdataset);
        }
-       cleanup_logging(&log);
        if (verbose > 10) {
                isc_mem_stats(mctx, stdout);
        }
index 165707d553045fd9a79b5ffae15b880feabe7653..1be060d0e148c7065aa06e3c5805ca8d41d26464 100644 (file)
@@ -299,7 +299,6 @@ main(int argc, char **argv) {
        char *endp;
        int ch;
        isc_result_t result;
-       isc_log_t *log = NULL;
        dns_rdataset_t rdataset;
        dns_rdata_t rdata;
        isc_stdtime_t now = isc_stdtime_now();
@@ -408,7 +407,7 @@ main(int argc, char **argv) {
                fatal("extraneous arguments");
        }
 
-       setup_logging(mctx, &log);
+       setup_logging();
 
        dns_rdataset_init(&rdataset);
 
@@ -452,7 +451,6 @@ main(int argc, char **argv) {
        if (dns_rdataset_isassociated(&rdataset)) {
                dns_rdataset_disassociate(&rdataset);
        }
-       cleanup_logging(&log);
        if (verbose > 10) {
                isc_mem_stats(mctx, stdout);
        }
index ce823e8f83351452a80f438be88c3a797728be33..4ca9bfbb6b3dc468a490ee54ec6828fa4640840d 100644 (file)
@@ -125,7 +125,6 @@ main(int argc, char **argv) {
        isc_textregion_t r;
        char filename[255];
        isc_buffer_t buf;
-       isc_log_t *log = NULL;
        dns_rdataclass_t rdclass;
        int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
        char *label = NULL;
@@ -332,7 +331,7 @@ main(int argc, char **argv) {
                }
        }
 
-       setup_logging(mctx, &log);
+       setup_logging();
 
        if (predecessor == NULL) {
                if (label == NULL) {
@@ -723,7 +722,6 @@ main(int argc, char **argv) {
                dst_key_free(&prevkey);
        }
 
-       cleanup_logging(&log);
        if (verbose > 10) {
                isc_mem_stats(mctx, stdout);
        }
index ffcbaba23e44dc28b4caf519c1c30acb4dc05408..75905ec108b76223bb000e4b6c31b9966220064d 100644 (file)
@@ -72,8 +72,6 @@ const char *program = "dnssec-keygen";
 static int min_rsa = 1024;
 static int min_dh = 128;
 
-isc_log_t *lctx = NULL;
-
 ISC_NORETURN static void
 usage(void);
 
@@ -1145,7 +1143,7 @@ main(int argc, char **argv) {
                min_rsa = min_dh = 2048;
        }
 
-       setup_logging(mctx, &lctx);
+       setup_logging();
 
        ctx.rdclass = strtoclass(classname);
 
@@ -1225,7 +1223,7 @@ main(int argc, char **argv) {
                        dns_kasp_t *kasp = NULL;
                        dns_kasp_key_t *kaspkey = NULL;
 
-                       RUNTIME_CHECK(cfg_parser_create(mctx, lctx, &parser) ==
+                       RUNTIME_CHECK(cfg_parser_create(mctx, &parser) ==
                                      ISC_R_SUCCESS);
                        if (cfg_parse_file(parser, ctx.configfile,
                                           &cfg_type_namedconf,
@@ -1236,8 +1234,8 @@ main(int argc, char **argv) {
                                      ctx.policy, ctx.configfile);
                        }
 
-                       kasp_from_conf(config, mctx, lctx, ctx.policy,
-                                      ctx.directory, &kasp);
+                       kasp_from_conf(config, mctx, ctx.policy, ctx.directory,
+                                      &kasp);
                        if (kasp == NULL) {
                                fatal("failed to load dnssec-policy '%s'",
                                      ctx.policy);
@@ -1281,7 +1279,6 @@ main(int argc, char **argv) {
                keygen(&ctx, mctx, argc, argv);
        }
 
-       cleanup_logging(&lctx);
        if (verbose > 10) {
                isc_mem_stats(mctx, stdout);
        }
index 07e9c973109dfdc50b5e0adca9a3a041451daf74..aa4522debae236655f44217491c0815c806c5a40 100644 (file)
@@ -39,7 +39,6 @@ const char *program = "dnssec-ksr";
 /*
  * Infrastructure
  */
-static isc_log_t *lctx = NULL;
 static isc_mem_t *mctx = NULL;
 /*
  * The domain we are working on
@@ -164,14 +163,14 @@ getkasp(ksr_ctx_t *ksr, dns_kasp_t **kasp) {
        cfg_parser_t *parser = NULL;
        cfg_obj_t *config = NULL;
 
-       RUNTIME_CHECK(cfg_parser_create(mctx, lctx, &parser) == ISC_R_SUCCESS);
+       RUNTIME_CHECK(cfg_parser_create(mctx, &parser) == ISC_R_SUCCESS);
        if (cfg_parse_file(parser, ksr->configfile, &cfg_type_namedconf,
                           &config) != ISC_R_SUCCESS)
        {
                fatal("unable to load dnssec-policy '%s' from '%s'",
                      ksr->policy, ksr->configfile);
        }
-       kasp_from_conf(config, mctx, lctx, ksr->policy, ksr->keydir, kasp);
+       kasp_from_conf(config, mctx, ksr->policy, ksr->keydir, kasp);
        if (*kasp == NULL) {
                fatal("failed to load dnssec-policy '%s'", ksr->policy);
        }
@@ -1272,7 +1271,7 @@ main(int argc, char *argv[]) {
                min_rsa = min_dh = 2048;
        }
 
-       setup_logging(mctx, &lctx);
+       setup_logging();
 
        if (set_fips_mode) {
 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
index 5b630ab115ebb264d6cf7ac21d35fe72b5cfc6e2..46431f448ea83be42482eb9664555fc00567252c 100644 (file)
@@ -226,7 +226,6 @@ main(int argc, char **argv) {
        bool epoch = false;
        bool changed = false;
        bool write_state = false;
-       isc_log_t *log = NULL;
        isc_stdtime_t syncadd = 0, syncdel = 0;
        bool unsetsyncadd = false, setsyncadd = false;
        bool unsetsyncdel = false, setsyncdel = false;
@@ -245,7 +244,7 @@ main(int argc, char **argv) {
 
        isc_mem_create(&mctx);
 
-       setup_logging(mctx, &log);
+       setup_logging();
 
        isc_commandline_errprint = false;
 
@@ -947,7 +946,6 @@ main(int argc, char **argv) {
        if (verbose > 10) {
                isc_mem_stats(mctx, stdout);
        }
-       cleanup_logging(&log);
        isc_mem_free(mctx, directory);
        isc_mem_destroy(&mctx);
 
index 82d4cf0721b61055d9657ea7402ba241d0579f50..17382033f9fbff75a82e6b990d111b29ef6b142f 100644 (file)
@@ -3350,7 +3350,6 @@ main(int argc, char *argv[]) {
        isc_time_t sign_start, sign_finish;
        dns_dnsseckey_t *key;
        isc_result_t result, vresult;
-       isc_log_t *log = NULL;
        bool free_output = false;
        int tempfilelen = 0;
        dns_rdataclass_t rdclass;
@@ -3745,7 +3744,7 @@ main(int argc, char *argv[]) {
                }
        }
 
-       setup_logging(mctx, &log);
+       setup_logging();
 
        argc -= isc_commandline_index;
        argv += isc_commandline_index;
@@ -4116,7 +4115,6 @@ main(int argc, char *argv[]) {
 
        dns_master_styledestroy(&dsstyle, mctx);
 
-       cleanup_logging(&log);
        if (verbose > 10) {
                isc_mem_stats(mctx, stdout);
        }
index ce7101c5941ad9cf7f06bbcce5eb38fc115258dc..4c3504e34e89e06ee0fdbdf689e93160c1f834c4 100644 (file)
@@ -168,7 +168,6 @@ main(int argc, char *argv[]) {
        char *origin = NULL, *file = NULL;
        char *inputformatstr = NULL;
        isc_result_t result;
-       isc_log_t *log = NULL;
        char *classname = NULL;
        dns_rdataclass_t rdclass;
        char *endp;
@@ -276,7 +275,7 @@ main(int argc, char *argv[]) {
 
        rdclass = strtoclass(classname);
 
-       setup_logging(mctx, &log);
+       setup_logging();
 
        argc -= isc_commandline_index;
        argv += isc_commandline_index;
@@ -326,7 +325,6 @@ main(int argc, char *argv[]) {
        dns_db_closeversion(gdb, &gversion, false);
        dns_db_detach(&gdb);
 
-       cleanup_logging(&log);
        if (verbose > 10) {
                isc_mem_stats(mctx, stdout);
        }
index 3c272135d010c55e1a78e0b0286e5dbf89921d80..5fa03d79796a5ad530998639818939c6ebe7fcf9 100644 (file)
@@ -128,10 +128,9 @@ sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size) {
 }
 
 void
-setup_logging(isc_mem_t *mctx ISC_ATTR_UNUSED, isc_log_t **logp) {
+setup_logging(void) {
        isc_logdestination_t destination;
        isc_logconfig_t *logconfig = NULL;
-       isc_log_t *log = NULL;
        int level;
 
        if (verbose < 0) {
@@ -153,9 +152,9 @@ setup_logging(isc_mem_t *mctx ISC_ATTR_UNUSED, isc_log_t **logp) {
                break;
        }
 
-       dns_log_init(log);
+       dns_log_init();
 
-       logconfig = isc_logconfig_get(log);
+       logconfig = isc_logconfig_get();
 
        isc_log_settag(logconfig, program);
 
@@ -175,20 +174,6 @@ setup_logging(isc_mem_t *mctx ISC_ATTR_UNUSED, isc_log_t **logp) {
 
        RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr", NULL, NULL) ==
                      ISC_R_SUCCESS);
-
-       *logp = log;
-}
-
-void
-cleanup_logging(isc_log_t **logp) {
-       REQUIRE(logp != NULL);
-
-       isc_log_t *log = *logp;
-       *logp = NULL;
-
-       if (log == NULL) {
-               return;
-       }
 }
 
 static isc_stdtime_t
@@ -598,8 +583,8 @@ cleanup:
 }
 
 void
-kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, isc_log_t *lctx,
-              const char *name, const char *keydir, dns_kasp_t **kaspp) {
+kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name,
+              const char *keydir, dns_kasp_t **kaspp) {
        isc_result_t result = ISC_R_NOTFOUND;
        const cfg_listelt_t *element;
        const cfg_obj_t *kasps = NULL;
@@ -618,8 +603,7 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, isc_log_t *lctx,
        {
                cfg_obj_t *kconfig = cfg_listelt_value(element);
                ks = NULL;
-               result = cfg_keystore_fromconfig(kconfig, mctx, lctx, &kslist,
-                                                NULL);
+               result = cfg_keystore_fromconfig(kconfig, mctx, &kslist, NULL);
                if (result != ISC_R_SUCCESS) {
                        fatal("failed to configure key-store '%s': %s",
                              cfg_obj_asstring(cfg_tuple_get(kconfig, "name")),
@@ -628,7 +612,7 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, isc_log_t *lctx,
        }
        /* Default key-directory key store. */
        ks = NULL;
-       (void)cfg_keystore_fromconfig(NULL, mctx, lctx, &kslist, &ks);
+       (void)cfg_keystore_fromconfig(NULL, mctx, &kslist, &ks);
        INSIST(ks != NULL);
        if (keydir != NULL) {
                /* '-K keydir' takes priority */
@@ -648,8 +632,8 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, isc_log_t *lctx,
                        continue;
                }
 
-               result = cfg_kasp_fromconfig(kconfig, NULL, true, mctx, lctx,
-                                            &kslist, &kasplist, &kasp);
+               result = cfg_kasp_fromconfig(kconfig, NULL, true, mctx, &kslist,
+                                            &kasplist, &kasp);
                if (result != ISC_R_SUCCESS) {
                        fatal("failed to configure dnssec-policy '%s': %s",
                              cfg_obj_asstring(cfg_tuple_get(kconfig, "name")),
index 1107fa7eb19a94bc9dae044599c21f033bb00ab6..3cd0571fd52cd6ffddc00139a319be62c736f87a 100644 (file)
@@ -75,10 +75,7 @@ sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
        (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
 
 void
-setup_logging(isc_mem_t *mctx, isc_log_t **logp);
-
-void
-cleanup_logging(isc_log_t **logp);
+setup_logging(void);
 
 dns_ttl_t
 strtottl(const char *str);
@@ -118,5 +115,5 @@ void
 loadjournal(isc_mem_t *mctx, dns_db_t *db, const char *journal);
 
 void
-kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, isc_log_t *lctx,
-              const char *name, const char *keydir, dns_kasp_t **kaspp);
+kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name,
+              const char *keydir, dns_kasp_t **kaspp);
index 4900e813cf2ea9338a28d7839869f25f03362a11..ed3228723deeac8af562932706dbf7592ddc68b6 100644 (file)
@@ -451,8 +451,8 @@ named_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
        r.length = strlen(r.base);
        result = dns_rdataclass_fromtext(classp, &r);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(classobj, named_g_lctx, ISC_LOG_ERROR,
-                           "unknown class '%s'", r.base);
+               cfg_obj_log(classobj, ISC_LOG_ERROR, "unknown class '%s'",
+                           r.base);
        }
        return (result);
 }
@@ -471,8 +471,8 @@ named_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
        r.length = strlen(r.base);
        result = dns_rdatatype_fromtext(typep, &r);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(typeobj, named_g_lctx, ISC_LOG_ERROR,
-                           "unknown type '%s'", r.base);
+               cfg_obj_log(typeobj, ISC_LOG_ERROR, "unknown type '%s'",
+                           r.base);
        }
        return (result);
 }
@@ -663,7 +663,7 @@ newlist:
        if (cfg_obj_isuint32(portobj)) {
                uint32_t val = cfg_obj_asuint32(portobj);
                if (val > UINT16_MAX) {
-                       cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(portobj, ISC_LOG_ERROR,
                                    "port '%u' out of range", val);
                        result = ISC_R_RANGE;
                        goto cleanup;
@@ -718,7 +718,7 @@ resume:
                        tresult = named_config_getremotesdef(config, listtype,
                                                             listname, &list);
                        if (tresult == ISC_R_NOTFOUND) {
-                               cfg_obj_log(addr, named_g_lctx, ISC_LOG_ERROR,
+                               cfg_obj_log(addr, ISC_LOG_ERROR,
                                            "%s \"%s\" not found", listtype,
                                            listname);
 
@@ -890,8 +890,7 @@ named_config_getport(const cfg_obj_t *config, const char *type,
        result = named_config_get(maps, type, &portobj);
        INSIST(result == ISC_R_SUCCESS);
        if (cfg_obj_asuint32(portobj) >= UINT16_MAX) {
-               cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR,
-                           "port '%u' out of range",
+               cfg_obj_log(portobj, ISC_LOG_ERROR, "port '%u' out of range",
                            cfg_obj_asuint32(portobj));
                return (ISC_R_RANGE);
        }
index d2aa5a92605eaf9ff5e28363d43f63462f11e0ee..8ea363b5bdb28685c7aa412d3c21d477849ff212 100644 (file)
@@ -135,7 +135,7 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
            !command_compare(command, NAMED_COMMAND_TESTGEN) &&
            !command_compare(command, NAMED_COMMAND_ZONESTATUS))
        {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                              NAMED_LOGMODULE_CONTROL, log_level,
                              "rejecting restricted control channel "
                              "command '%s'",
@@ -144,9 +144,9 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
                goto cleanup;
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_CONTROL, log_level,
-                     "received control channel command '%s'", cmdline);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_CONTROL,
+                     log_level, "received control channel command '%s'",
+                     cmdline);
 
        /*
         * After the lengthy "halt" and "stop", the commands are
@@ -203,7 +203,7 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
        {
                result = named_server_changezone(named_g_server, cmdline, text);
        } else if (command_compare(command, NAMED_COMMAND_CLOSELOGS)) {
-               isc_log_closefilelogs(named_g_lctx);
+               isc_log_closefilelogs();
                result = ISC_R_SUCCESS;
        } else if (command_compare(command, NAMED_COMMAND_DELZONE)) {
                result = named_server_delzone(named_g_server, lex, text);
@@ -238,7 +238,7 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
                result = named_server_notifycommand(named_g_server, lex, text);
        } else if (command_compare(command, NAMED_COMMAND_NOTRACE)) {
                named_g_debuglevel = 0;
-               isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
+               isc_log_setdebuglevel(named_g_debuglevel);
                result = ISC_R_SUCCESS;
        } else if (command_compare(command, NAMED_COMMAND_NTA)) {
                result = named_server_nta(named_g_server, lex, readonly, text);
@@ -287,7 +287,7 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
        } else if (command_compare(command, NAMED_COMMAND_ZONESTATUS)) {
                result = named_server_zonestatus(named_g_server, lex, text);
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                              NAMED_LOGMODULE_CONTROL, ISC_LOG_WARNING,
                              "unknown control channel command '%s'", command);
                result = DNS_R_UNKNOWNCOMMAND;
index e276497f9e682b8482c351e959924acf242df4cc..52deb65b9861a053cd113f6f3dd6e30bd48ba3c1 100644 (file)
@@ -225,9 +225,9 @@ shutdown_listener(controllistener_t *listener) {
 
        char socktext[ISC_SOCKADDR_FORMATSIZE];
        isc_sockaddr_format(&listener->address, socktext, sizeof(socktext));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
-                     "stopping command channel on %s", socktext);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_CONTROL,
+                     ISC_LOG_NOTICE, "stopping command channel on %s",
+                     socktext);
 
        isc_nm_stoplistening(listener->sock);
        isc_nmsocket_close(&listener->sock);
@@ -272,7 +272,7 @@ control_senddone(isc_nmhandle_t *handle, isc_result_t result, void *arg) {
                isc_sockaddr_t peeraddr = isc_nmhandle_peeraddr(handle);
 
                isc_sockaddr_format(&peeraddr, socktext, sizeof(socktext));
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                              NAMED_LOGMODULE_CONTROL, ISC_LOG_WARNING,
                              "error sending command response to %s: %s",
                              socktext, isc_result_totext(result));
@@ -291,9 +291,8 @@ log_invalid(isccc_ccmsg_t *ccmsg, isc_result_t result) {
        isc_sockaddr_t peeraddr = isc_nmhandle_peeraddr(ccmsg->handle);
 
        isc_sockaddr_format(&peeraddr, socktext, sizeof(socktext));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_CONTROL, ISC_LOG_ERROR,
-                     "invalid command from %s: %s", socktext,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_CONTROL,
+                     ISC_LOG_ERROR, "invalid command from %s: %s", socktext,
                      isc_result_totext(result));
 }
 
@@ -588,9 +587,8 @@ conn_free(controlconnection_t *conn) {
        }
 #endif /* ifdef ENABLE_AFL */
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_CONTROL, ISC_LOG_DEBUG(3),
-                     "freeing control connection");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_CONTROL,
+                     ISC_LOG_DEBUG(3), "freeing control connection");
 
        isc_mem_put(listener->mctx, conn, sizeof(*conn));
 
@@ -601,7 +599,7 @@ static void
 newconnection(controllistener_t *listener, isc_nmhandle_t *handle) {
        /* Don't create new connection if we are shutting down */
        if (listener->shuttingdown) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                              NAMED_LOGMODULE_CONTROL, ISC_LOG_DEBUG(3),
                              "rejected new control connection: %s",
                              isc_result_totext(ISC_R_SHUTTINGDOWN));
@@ -609,9 +607,8 @@ newconnection(controllistener_t *listener, isc_nmhandle_t *handle) {
        }
 
        controlconnection_t *conn = isc_mem_get(listener->mctx, sizeof(*conn));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_CONTROL, ISC_LOG_DEBUG(3),
-                     "allocate new control connection");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_CONTROL,
+                     ISC_LOG_DEBUG(3), "allocate new control connection");
 
        *conn = (controlconnection_t){
                .alg = DST_ALG_UNKNOWN,
@@ -648,7 +645,7 @@ control_newconn(isc_nmhandle_t *handle, isc_result_t result, void *arg) {
        if (!address_ok(&peeraddr, listener)) {
                char socktext[ISC_SOCKADDR_FORMATSIZE];
                isc_sockaddr_format(&peeraddr, socktext, sizeof(socktext));
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                              NAMED_LOGMODULE_CONTROL, ISC_LOG_WARNING,
                              "rejected command channel message from %s",
                              socktext);
@@ -760,7 +757,7 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
 
                result = cfgkeylist_find(keylist, keyid->keyname, &keydef);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(control, ISC_LOG_WARNING,
                                    "couldn't find key '%s' for use with "
                                    "command channel %s",
                                    keyid->keyname, socktext);
@@ -783,8 +780,7 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
                        result = named_config_getkeyalgorithm(algstr, &algtype,
                                                              NULL);
                        if (result != ISC_R_SUCCESS) {
-                               cfg_obj_log(control, named_g_lctx,
-                                           ISC_LOG_WARNING,
+                               cfg_obj_log(control, ISC_LOG_WARNING,
                                            "unsupported algorithm '%s' in "
                                            "key '%s' for use with command "
                                            "channel %s",
@@ -799,8 +795,7 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
                        result = isc_base64_decodestring(secretstr, &b);
 
                        if (result != ISC_R_SUCCESS) {
-                               cfg_obj_log(keydef, named_g_lctx,
-                                           ISC_LOG_WARNING,
+                               cfg_obj_log(keydef, ISC_LOG_WARNING,
                                            "secret for key '%s' on "
                                            "command channel %s: %s",
                                            keyid->keyname, socktext,
@@ -834,14 +829,14 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
        unsigned int algtype;
        isc_buffer_t b;
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_CONTROL, ISC_LOG_INFO,
-                     "configuring command channel from '%s'", named_g_keyfile);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_CONTROL,
+                     ISC_LOG_INFO, "configuring command channel from '%s'",
+                     named_g_keyfile);
        if (!isc_file_exists(named_g_keyfile)) {
                return (ISC_R_FILENOTFOUND);
        }
 
-       CHECK(cfg_parser_create(mctx, named_g_lctx, &pctx));
+       CHECK(cfg_parser_create(mctx, &pctx));
        CHECK(cfg_parse_file(pctx, named_g_keyfile, &cfg_type_rndckey,
                             &config));
        CHECK(cfg_map_get(config, "key", &key));
@@ -857,7 +852,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
                CHECK(ISC_R_NOMEMORY);
        }
 
-       CHECK(isccfg_check_key(key, named_g_lctx));
+       CHECK(isccfg_check_key(key));
 
        (void)cfg_map_get(key, "algorithm", &algobj);
        (void)cfg_map_get(key, "secret", &secretobj);
@@ -868,7 +863,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
 
        result = named_config_getkeyalgorithm(algstr, &algtype, NULL);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(key, ISC_LOG_WARNING,
                            "unsupported algorithm '%s' in "
                            "key '%s' for use with command "
                            "channel",
@@ -881,7 +876,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
        result = isc_base64_decodestring(secretstr, &b);
 
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(key, ISC_LOG_WARNING,
                            "secret for key '%s' on command channel: %s",
                            keyid->keyname, isc_result_totext(result));
                goto cleanup;
@@ -1009,12 +1004,12 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp,
                 * sake of avoiding this message would be too much trouble.
                 */
                if (control != NULL) {
-                       cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(control, ISC_LOG_WARNING,
                                    "couldn't install new keys for "
                                    "command channel %s: %s",
                                    socktext, isc_result_totext(result));
                } else {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_CONTROL, ISC_LOG_WARNING,
                                      "couldn't install new keys for "
                                      "command channel %s: %s",
@@ -1027,9 +1022,8 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp,
         */
        if (control != NULL && type == isc_socktype_tcp) {
                allow = cfg_tuple_get(control, "allow");
-               result = cfg_acl_fromconfig(allow, config, named_g_lctx,
-                                           aclconfctx, listener->mctx, 0,
-                                           &new_acl);
+               result = cfg_acl_fromconfig(allow, config, aclconfctx,
+                                           listener->mctx, 0, &new_acl);
        } else {
                result = dns_acl_any(listener->mctx, &new_acl);
        }
@@ -1049,12 +1043,12 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp,
                dns_acl_detach(&new_acl);
                /* XXXDCL say the old acl is still used? */
        } else if (control != NULL) {
-               cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(control, ISC_LOG_WARNING,
                            "couldn't install new acl for "
                            "command channel %s: %s",
                            socktext, isc_result_totext(result));
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                              NAMED_LOGMODULE_CONTROL, ISC_LOG_WARNING,
                              "couldn't install new acl for "
                              "command channel %s: %s",
@@ -1101,8 +1095,8 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
                const cfg_obj_t *readonly = NULL;
 
                allow = cfg_tuple_get(control, "allow");
-               CHECK(cfg_acl_fromconfig(allow, config, named_g_lctx,
-                                        aclconfctx, mctx, 0, &new_acl));
+               CHECK(cfg_acl_fromconfig(allow, config, aclconfctx, mctx, 0,
+                                        &new_acl));
 
                readonly = cfg_tuple_get(control, "read-only");
                if (!cfg_obj_isvoid(readonly)) {
@@ -1128,7 +1122,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
        } else {
                result = get_rndckey(mctx, &listener->keys);
                if (result != ISC_R_SUCCESS && control != NULL) {
-                       cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(control, ISC_LOG_WARNING,
                                    "couldn't install keys for "
                                    "command channel %s: %s",
                                    socktext, isc_result_totext(result));
@@ -1146,9 +1140,9 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
                               &listener->address, control_newconn, listener, 5,
                               NULL, &listener->sock));
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
-                     "command channel listening on %s", socktext);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_CONTROL,
+                     ISC_LOG_NOTICE, "command channel listening on %s",
+                     socktext);
        *listenerp = listener;
        return;
 
@@ -1159,11 +1153,11 @@ cleanup:
 
 shuttingdown:
        if (control != NULL) {
-               cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(control, ISC_LOG_WARNING,
                            "couldn't add command channel %s: %s", socktext,
                            isc_result_totext(result));
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                              NAMED_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
                              "couldn't add command channel %s: %s", socktext,
                              isc_result_totext(result));
@@ -1208,8 +1202,7 @@ named_controls_configure(named_controls_t *cp, const cfg_obj_t *config,
 
                        (void)cfg_map_get(controls, "unix", &unixcontrols);
                        if (unixcontrols != NULL) {
-                               cfg_obj_log(controls, named_g_lctx,
-                                           ISC_LOG_ERROR,
+                               cfg_obj_log(controls, ISC_LOG_ERROR,
                                            "UNIX domain sockets are not "
                                            "supported");
                                return (ISC_R_FAILURE);
@@ -1245,8 +1238,7 @@ named_controls_configure(named_controls_t *cp, const cfg_obj_t *config,
                                isc_sockaddr_format(&addr, socktext,
                                                    sizeof(socktext));
 
-                               isc_log_write(named_g_lctx,
-                                             NAMED_LOGCATEGORY_GENERAL,
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                              NAMED_LOGMODULE_CONTROL,
                                              ISC_LOG_DEBUG(9),
                                              "processing control channel %s",
index 55c6e1e3b15afb4182e86e46260038fe194e5339..eedfceec264807ec86e9897f0e67a2bc6cbca9f0 100644 (file)
@@ -80,7 +80,7 @@ static void
 dlopen_log(int level, const char *fmt, ...) {
        va_list ap;
        va_start(ap, fmt);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+       isc_log_vwrite(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
                       ISC_LOG_DEBUG(level), fmt, ap);
        va_end(ap);
 }
index 6d94af266c415ea7e8e6fa22b629d8a55b8d4807..6e713e35b30c6a30dcde41775ba49c867d280101 100644 (file)
@@ -39,8 +39,8 @@ open_geoip2(const char *dir, const char *dbfile, MMDB_s *mmdb) {
 
        n = snprintf(pathbuf, sizeof(pathbuf), "%s/%s", dir, dbfile);
        if (n >= sizeof(pathbuf)) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "GeoIP2 database '%s/%s': path too long", dir,
                              dbfile);
                return (NULL);
@@ -48,14 +48,14 @@ open_geoip2(const char *dir, const char *dbfile, MMDB_s *mmdb) {
 
        ret = MMDB_open(pathbuf, MMDB_MODE_MMAP, mmdb);
        if (ret == MMDB_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "opened GeoIP2 database '%s'", pathbuf);
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "opened GeoIP2 database '%s'",
+                             pathbuf);
                return (mmdb);
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_DEBUG(1),
                      "unable to open GeoIP2 database '%s' (status %d)",
                      pathbuf, ret);
 
@@ -79,9 +79,9 @@ named_geoip_load(char *dir) {
 #if defined(HAVE_GEOIP2)
        REQUIRE(dir != NULL);
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "looking for GeoIP2 databases in '%s'", dir);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "looking for GeoIP2 databases in '%s'",
+                     dir);
 
        named_g_geoip->country = open_geoip2(dir, "GeoIP2-Country.mmdb",
                                             &geoip_country);
index 6de1be8e3667fb96c046d0aba1ebbf880283c483..5d49d0da77d3536c9813fa5c9c00d5bb8c2d08ae 100644 (file)
@@ -86,7 +86,6 @@ EXTERN named_server_t *named_g_server INIT(NULL);
 /*
  * Logging.
  */
-EXTERN isc_log_t *named_g_lctx              INIT(NULL);
 EXTERN isc_logcategory_t *named_g_categories INIT(NULL);
 EXTERN isc_logmodule_t *named_g_modules             INIT(NULL);
 EXTERN unsigned int named_g_debuglevel      INIT(0);
index eebe89208137da3b8e68383d05f8e6720bb4d153..b6045bd979c986f6cc077926c47c6c853070af21 100644 (file)
@@ -79,6 +79,3 @@ named_log_setunmatchedcategory(isc_logconfig_t *lcfg);
 /*%
  * Set up "category unmatched" to go to the right places.
  */
-
-void
-named_log_shutdown(void) __attribute__((__deprecated__));
index 41102c1c9f39ee52c4c2e800c67671b23a8223b3..03629531730dc6ba19698d241b6b44863fa0bf08 100644 (file)
@@ -55,18 +55,14 @@ named_log_init(bool safe) {
        named_g_categories = categories;
        named_g_modules = modules;
 
-       /*
-        * Setup a logging context.
-        */
-
        /*
         * named-checktool.c:setup_logging() needs to be kept in sync.
         */
-       isc_log_registercategories(named_g_lctx, named_g_categories);
-       isc_log_registermodules(named_g_lctx, named_g_modules);
-       dns_log_init(named_g_lctx);
-       cfg_log_init(named_g_lctx);
-       ns_log_init(named_g_lctx);
+       isc_log_registercategories(named_g_categories);
+       isc_log_registermodules(named_g_modules);
+       dns_log_init();
+       cfg_log_init();
+       ns_log_init();
 
        /*
         * This is not technically needed, as we are calling named_log_init()
@@ -75,7 +71,7 @@ named_log_init(bool safe) {
         * hygiene.
         */
        rcu_read_lock();
-       lcfg = isc_logconfig_get(named_g_lctx);
+       lcfg = isc_logconfig_get();
        if (safe) {
                named_log_setsafechannels(lcfg);
        } else {
@@ -138,7 +134,7 @@ named_log_setdefaultchannels(isc_logconfig_t *lcfg) {
        /*
         * Set the initial debug level.
         */
-       isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
+       isc_log_setdebuglevel(named_g_debuglevel);
 }
 
 void
@@ -153,9 +149,9 @@ named_log_setsafechannels(isc_logconfig_t *lcfg) {
                 * Setting the debug level to zero should get the output
                 * discarded a bit faster.
                 */
-               isc_log_setdebuglevel(named_g_lctx, 0);
+               isc_log_setdebuglevel(0);
        } else {
-               isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
+               isc_log_setdebuglevel(named_g_debuglevel);
        }
 
        if (named_g_logfile != NULL) {
@@ -247,8 +243,3 @@ named_log_setunmatchedcategory(isc_logconfig_t *lcfg) {
                                    NULL);
        return (result);
 }
-
-void
-named_log_shutdown(void) {
-       /* no-op */
-}
index 01151de8b89cfa7b739416bb0309438672d65ff0..04057f56c170205b4361b1d64ee6ca27f198a832 100644 (file)
@@ -50,9 +50,9 @@ category_fromconf(const cfg_obj_t *ccat, isc_logconfig_t *logconfig) {
        const cfg_listelt_t *element = NULL;
 
        catname = cfg_obj_asstring(cfg_tuple_get(ccat, "name"));
-       category = isc_log_categorybyname(named_g_lctx, catname);
+       category = isc_log_categorybyname(catname);
        if (category == NULL) {
-               cfg_obj_log(ccat, named_g_lctx, ISC_LOG_ERROR,
+               cfg_obj_log(ccat, ISC_LOG_ERROR,
                            "unknown logging category '%s' ignored", catname);
                /*
                 * Allow further processing by returning success.
@@ -76,7 +76,7 @@ category_fromconf(const cfg_obj_t *ccat, isc_logconfig_t *logconfig) {
                result = isc_log_usechannel(logconfig, channelname, category,
                                            module);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, CFG_LOGCATEGORY_CONFIG,
+                       isc_log_write(CFG_LOGCATEGORY_CONFIG,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "logging channel '%s': %s", channelname,
                                      isc_result_totext(result));
@@ -127,7 +127,7 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
        }
 
        if (i != 1) {
-               cfg_obj_log(channel, named_g_lctx, ISC_LOG_ERROR,
+               cfg_obj_log(channel, ISC_LOG_ERROR,
                            "channel '%s': exactly one of file, syslog, "
                            "null, and stderr must be present",
                            channelname);
index 0d6af4115a1ade7458aa6bf456a27788c3063c80..4588249c316a8abb10df35995c0ee45f4c93e0f9 100644 (file)
@@ -161,10 +161,9 @@ named_main_earlywarning(const char *format, ...) {
        va_list args;
 
        va_start(args, format);
-       if (named_g_lctx != NULL) {
-               isc_log_vwrite(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                              NAMED_LOGMODULE_MAIN, ISC_LOG_WARNING, format,
-                              args);
+       if (named_g_categories != NULL) {
+               isc_log_vwrite(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                              ISC_LOG_WARNING, format, args);
        } else {
                fprintf(stderr, "%s: ", program_name);
                vfprintf(stderr, format, args);
@@ -179,12 +178,11 @@ named_main_earlyfatal(const char *format, ...) {
        va_list args;
 
        va_start(args, format);
-       if (named_g_lctx != NULL) {
-               isc_log_vwrite(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                              NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL, format,
-                              args);
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL,
+       if (named_g_categories != NULL) {
+               isc_log_vwrite(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                              ISC_LOG_CRITICAL, format, args);
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                             ISC_LOG_CRITICAL,
                              "exiting (due to early fatal error)");
        } else {
                fprintf(stderr, "%s: ", program_name);
@@ -208,21 +206,20 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type,
         * Handle assertion failures.
         */
 
-       if (named_g_lctx != NULL) {
+       if (named_g_categories != NULL) {
                /*
                 * Reset the assertion callback in case it is the log
                 * routines causing the assertion.
                 */
                isc_assertion_setcallback(NULL);
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL,
-                             "%s:%d: %s(%s) failed", file, line,
-                             isc_assertion_typetotext(type), cond);
-               isc_backtrace_log(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                             ISC_LOG_CRITICAL, "%s:%d: %s(%s) failed", file,
+                             line, isc_assertion_typetotext(type), cond);
+               isc_backtrace_log(NAMED_LOGCATEGORY_GENERAL,
                                  NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL);
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                             ISC_LOG_CRITICAL,
                              "exiting (due to assertion failure)");
        } else {
                fprintf(stderr, "%s:%d: %s(%s) failed\n", file, line,
@@ -247,21 +244,20 @@ library_fatal_error(const char *file, int line, const char *func,
         * Handle isc_error_fatal() calls from our libraries.
         */
 
-       if (named_g_lctx != NULL) {
+       if (named_g_categories != NULL) {
                /*
                 * Reset the error callback in case it is the log
                 * routines causing the assertion.
                 */
                isc_error_setfatal(NULL);
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                             ISC_LOG_CRITICAL,
                              "%s:%d:%s(): fatal error: ", file, line, func);
-               isc_log_vwrite(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                              NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL, format,
-                              args);
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_MAIN, ISC_LOG_CRITICAL,
+               isc_log_vwrite(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                              ISC_LOG_CRITICAL, format, args);
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                             ISC_LOG_CRITICAL,
                              "exiting (due to fatal error in library)");
        } else {
                fprintf(stderr, "%s:%d:%s(): fatal error: ", file, line, func);
@@ -288,14 +284,13 @@ library_unexpected_error(const char *file, int line, const char *func,
         * Handle isc_error_unexpected() calls from our libraries.
         */
 
-       if (named_g_lctx != NULL) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_MAIN, ISC_LOG_ERROR,
+       if (named_g_categories != NULL) {
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                             ISC_LOG_ERROR,
                              "%s:%d:%s(): unexpected error: ", file, line,
                              func);
-               isc_log_vwrite(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                              NAMED_LOGMODULE_MAIN, ISC_LOG_ERROR, format,
-                              args);
+               isc_log_vwrite(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                              ISC_LOG_ERROR, format, args);
        } else {
                fprintf(stderr, "%s:%d:%s(): fatal error: ", file, line, func);
                vfprintf(stderr, format, args);
@@ -510,9 +505,8 @@ list_hmac_algorithms(isc_buffer_t *b) {
 
 static void
 logit(isc_buffer_t *b) {
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "%.*s",
-                     (int)isc_buffer_usedlength(b),
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "%.*s", (int)isc_buffer_usedlength(b),
                      (char *)isc_buffer_base(b));
 }
 
@@ -657,7 +651,7 @@ printversion(bool verbose) {
 #define RTC(x) RUNTIME_CHECK((x) == ISC_R_SUCCESS)
        isc_mem_t *mctx = NULL;
        isc_mem_create(&mctx);
-       RTC(cfg_parser_create(mctx, named_g_lctx, &parser));
+       RTC(cfg_parser_create(mctx, &parser));
        RTC(named_config_parsedefaults(parser, &config));
        RTC(cfg_map_get(config, "options", &defaults));
        RTC(cfg_map_get(defaults, "geoip-directory", &obj));
@@ -1017,11 +1011,11 @@ create_managers(void) {
                named_g_cpus = named_g_cpus_detected;
        }
 
-       isc_log_write(
-               named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
-               ISC_LOG_INFO, "found %u CPU%s, using %u worker thread%s",
-               named_g_cpus_detected, named_g_cpus_detected == 1 ? "" : "s",
-               named_g_cpus, named_g_cpus == 1 ? "" : "s");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "found %u CPU%s, using %u worker thread%s",
+                     named_g_cpus_detected,
+                     named_g_cpus_detected == 1 ? "" : "s", named_g_cpus,
+                     named_g_cpus == 1 ? "" : "s");
 
        isc_managers_create(&named_g_mctx, named_g_cpus, &named_g_loopmgr,
                            &named_g_netmgr);
@@ -1101,141 +1095,129 @@ setup(void) {
                named_os_daemonize();
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "starting %s%s <id:%s>", PACKAGE_STRING,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "starting %s%s <id:%s>", PACKAGE_STRING,
                      PACKAGE_DESCRIPTION, PACKAGE_SRCID);
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "running on %s",
-                     named_os_uname());
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "running on %s", named_os_uname());
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "built with %s",
-                     PACKAGE_CONFIGARGS);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "built with %s", PACKAGE_CONFIGARGS);
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "running as: %s%s%s", program_name, saved_command_line,
-                     ellipsis);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "running as: %s%s%s", program_name,
+                     saved_command_line, ellipsis);
 #ifdef __clang__
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled by CLANG %s", __VERSION__);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled by CLANG %s", __VERSION__);
 #else /* ifdef __clang__ */
 #if defined(__ICC) || defined(__INTEL_COMPILER)
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled by ICC %s", __VERSION__);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled by ICC %s", __VERSION__);
 #else /* if defined(__ICC) || defined(__INTEL_COMPILER) */
 #ifdef __GNUC__
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled by GCC %s", __VERSION__);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled by GCC %s", __VERSION__);
 #endif /* ifdef __GNUC__ */
 #endif /* if defined(__ICC) || defined(__INTEL_COMPILER) */
 #endif /* ifdef __clang__ */
 #ifdef __SUNPRO_C
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled by Solaris Studio %x", __SUNPRO_C);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled by Solaris Studio %x",
+                     __SUNPRO_C);
 #endif /* ifdef __SUNPRO_C */
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled with OpenSSL version: %s",
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled with OpenSSL version: %s",
                      OPENSSL_VERSION_TEXT);
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to OpenSSL version: %s",
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "linked to OpenSSL version: %s",
                      OpenSSL_version(OPENSSL_VERSION));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled with libuv version: %d.%d.%d", UV_VERSION_MAJOR,
-                     UV_VERSION_MINOR, UV_VERSION_PATCH);
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to libuv version: %s", uv_version_string());
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled with %s version: %s", RCU_FLAVOR, RCU_VERSION);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled with libuv version: %d.%d.%d",
+                     UV_VERSION_MAJOR, UV_VERSION_MINOR, UV_VERSION_PATCH);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "linked to libuv version: %s",
+                     uv_version_string());
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled with %s version: %s",
+                     RCU_FLAVOR, RCU_VERSION);
 #if defined(JEMALLOC_VERSION)
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "compiled with jemalloc version: %u.%u.%u",
                      JEMALLOC_VERSION_MAJOR, JEMALLOC_VERSION_MINOR,
                      JEMALLOC_VERSION_BUGFIX);
 #elif defined(M_VERSION)
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "compiled with system jemalloc version: %u", M_VERSION);
 #endif
 #if HAVE_LIBNGHTTP2
        nghttp2_info *nginfo = NULL;
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled with libnghttp2 version: %s", NGHTTP2_VERSION);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled with libnghttp2 version: %s",
+                     NGHTTP2_VERSION);
        nginfo = nghttp2_version(1);
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to libnghttp2 version: %s", nginfo->version_str);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "linked to libnghttp2 version: %s",
+                     nginfo->version_str);
 #endif
 #ifdef HAVE_LIBXML2
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled with libxml2 version: %s",
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled with libxml2 version: %s",
                      LIBXML_DOTTED_VERSION);
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to libxml2 version: %s", xmlParserVersion);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "linked to libxml2 version: %s",
+                     xmlParserVersion);
 #endif /* ifdef HAVE_LIBXML2 */
 #if defined(HAVE_JSON_C)
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled with json-c version: %s", JSON_C_VERSION);
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to json-c version: %s", json_c_version());
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled with json-c version: %s",
+                     JSON_C_VERSION);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "linked to json-c version: %s",
+                     json_c_version());
 #endif /* if defined(HAVE_JSON_C) */
 #if defined(HAVE_ZLIB) && defined(ZLIB_VERSION)
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled with zlib version: %s", ZLIB_VERSION);
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to zlib version: %s", zlibVersion());
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled with zlib version: %s",
+                     ZLIB_VERSION);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "linked to zlib version: %s",
+                     zlibVersion());
 #endif /* if defined(HAVE_ZLIB) && defined(ZLIB_VERSION) */
 #if defined(HAVE_GEOIP2)
        /* Unfortunately, no version define on link time */
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to maxminddb version: %s", MMDB_lib_version());
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "linked to maxminddb version: %s",
+                     MMDB_lib_version());
 #endif /* if defined(HAVE_GEOIP2) */
 #if defined(HAVE_DNSTAP)
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "compiled with protobuf-c version: %s",
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "compiled with protobuf-c version: %s",
                      PROTOBUF_C_VERSION);
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "linked to protobuf-c version: %s", protobuf_c_version());
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "linked to protobuf-c version: %s",
+                     protobuf_c_version());
 #endif /* if defined(HAVE_DNSTAP) */
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "----------------------------------------------------");
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "BIND 9 is maintained by Internet Systems Consortium,");
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "Inc. (ISC), a non-profit 501(c)(3) public-benefit ");
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "corporation.  Support and training for BIND 9 are ");
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "available at https://www.isc.org/support");
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "----------------------------------------------------");
 
        /*
@@ -1367,9 +1349,8 @@ cleanup(void) {
         */
        dlz_dlopen_clear();
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, "exiting");
-       named_log_shutdown();
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE, "exiting");
 }
 
 static char *memstats = NULL;
index f07d943550c2a913e866778c3cd5760dc16a5f5e..49fd04df8470a0a9cde90e1d1812ead18f1b8216 100644 (file)
@@ -626,8 +626,8 @@ named_os_adjustnofile(void) {
        rlim_old = rl.rlim_cur;
 
        if (rl.rlim_cur == rl.rlim_max) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                             ISC_LOG_NOTICE,
                              "the limit on open files is already at the "
                              "maximum allowed value: "
                              "%" PRIu64,
@@ -641,8 +641,8 @@ named_os_adjustnofile(void) {
                goto fail;
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_MAIN,
+                     ISC_LOG_NOTICE,
                      "adjusted limit on open files from "
                      "%" PRIu64 " to "
                      "%" PRIu64,
index e3528276579eb3973c9e80aad420a8c302e1f41e..2a61a8cc45f936b65735a433f4d4796d55ead506 100644 (file)
                }                                \
        } while (0)
 
-#define CHECKM(op, msg)                                                        \
-       do {                                                                   \
-               result = (op);                                                 \
-               if (result != ISC_R_SUCCESS) {                                 \
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, \
-                                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,   \
-                                     "%s: %s", msg,                           \
-                                     isc_result_totext(result));              \
-                       goto cleanup;                                          \
-               }                                                              \
+#define CHECKM(op, msg)                                                      \
+       do {                                                                 \
+               result = (op);                                               \
+               if (result != ISC_R_SUCCESS) {                               \
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,             \
+                                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, \
+                                     "%s: %s", msg,                         \
+                                     isc_result_totext(result));            \
+                       goto cleanup;                                        \
+               }                                                            \
        } while (0)
 
-#define CHECKMF(op, msg, file)                                                 \
-       do {                                                                   \
-               result = (op);                                                 \
-               if (result != ISC_R_SUCCESS) {                                 \
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, \
-                                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,   \
-                                     "%s '%s': %s", msg, file,                \
-                                     isc_result_totext(result));              \
-                       goto cleanup;                                          \
-               }                                                              \
+#define CHECKMF(op, msg, file)                                               \
+       do {                                                                 \
+               result = (op);                                               \
+               if (result != ISC_R_SUCCESS) {                               \
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,             \
+                                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, \
+                                     "%s '%s': %s", msg, file,              \
+                                     isc_result_totext(result));            \
+                       goto cleanup;                                        \
+               }                                                            \
        } while (0)
 
 #define CHECKFATAL(op, msg)                    \
@@ -576,8 +576,7 @@ configure_view_acl(const cfg_obj_t *vconfig, const cfg_obj_t *config,
                aclobj = cfg_tuple_get(aclobj, acltuplename);
        }
 
-       result = cfg_acl_fromconfig(aclobj, config, named_g_lctx, actx, mctx, 0,
-                                   aclp);
+       result = cfg_acl_fromconfig(aclobj, config, actx, mctx, 0, aclp);
 
        return (result);
 }
@@ -622,8 +621,7 @@ configure_view_sortlist(const cfg_obj_t *vconfig, const cfg_obj_t *config,
         * as lists of separate, nested ACLs, rather than merged together
         * into IP tables as is usually done with ACLs.
         */
-       result = cfg_acl_fromconfig(aclobj, config, named_g_lctx, actx, mctx, 3,
-                                   aclp);
+       result = cfg_acl_fromconfig(aclobj, config, actx, mctx, 3, aclp);
 
        return (result);
 }
@@ -686,7 +684,7 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
                CHECK(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
                result = dns_nametree_add(*ntp, name, true);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(nameobj, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(nameobj, ISC_LOG_ERROR,
                                    "failed to add %s for %s: %s", str,
                                    confname, isc_result_totext(result));
                        goto cleanup;
@@ -759,7 +757,7 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, const char **namestrp,
                } else if (strcasecmp(atstr, "initial-ds") == 0) {
                        anchortype = INIT_DS;
                } else {
-                       cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(key, ISC_LOG_ERROR,
                                    "key '%s': "
                                    "invalid initialization method '%s'",
                                    namestr, atstr);
@@ -867,7 +865,7 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, const char **namestrp,
                        }
                        break;
                default:
-                       cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(key, ISC_LOG_ERROR,
                                    "key '%s': "
                                    "unknown ds digest type %u",
                                    namestr, ds->digest_type);
@@ -944,8 +942,7 @@ process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
                 * a fatal error - log a warning about this key being ignored,
                 * but do not prevent any further ones from being processed.
                 */
-               cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
-                           "ignoring %s for '%s': %s",
+               cfg_obj_log(key, ISC_LOG_WARNING, "ignoring %s for '%s': %s",
                            initializing ? "initial-key" : "static-key",
                            namestr, isc_result_totext(result));
                return (ISC_R_SUCCESS);
@@ -953,7 +950,7 @@ process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
                /*
                 * Crypto support is not available.
                 */
-               cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
+               cfg_obj_log(key, ISC_LOG_ERROR,
                            "ignoring %s for '%s': no crypto support",
                            initializing ? "initial-key" : "static-key",
                            namestr);
@@ -964,8 +961,7 @@ process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
                 * indicate an error so that the configuration loading process
                 * is interrupted.
                 */
-               cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
-                           "configuring %s for '%s': %s",
+               cfg_obj_log(key, ISC_LOG_ERROR, "configuring %s for '%s': %s",
                            initializing ? "initial-key" : "static-key",
                            namestr, isc_result_totext(result));
                return (ISC_R_FAILURE);
@@ -988,7 +984,7 @@ process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
        if (!dns_resolver_algorithm_supported(view->resolver, keyname,
                                              ds.algorithm))
        {
-               cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(key, ISC_LOG_WARNING,
                            "ignoring %s for '%s': algorithm is disabled",
                            initializing ? "initial-key" : "static-key",
                            namestr);
@@ -1146,7 +1142,7 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
                 * the trust-anchors clause hard-coded in named_g_config.
                 */
                if (bindkeys != NULL) {
-                       isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
+                       isc_log_write(DNS_LOGCATEGORY_SECURITY,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "obtaining root key for view %s "
                                      "from '%s'",
@@ -1156,17 +1152,17 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
                                          &builtin_keys);
 
                        if (builtin_keys == NULL) {
-                               isc_log_write(
-                                       named_g_lctx, DNS_LOGCATEGORY_SECURITY,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                                       "dnssec-validation auto: "
-                                       "WARNING: root zone key "
-                                       "not found");
+                               isc_log_write(DNS_LOGCATEGORY_SECURITY,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_WARNING,
+                                             "dnssec-validation auto: "
+                                             "WARNING: root zone key "
+                                             "not found");
                        }
                }
 
                if (builtin_keys == NULL) {
-                       isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
+                       isc_log_write(DNS_LOGCATEGORY_SECURITY,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "using built-in root key for view %s",
                                      view->name);
@@ -1181,7 +1177,7 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
                }
 
                if (!keyloaded(view, dns_rootname)) {
-                       isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
+                       isc_log_write(DNS_LOGCATEGORY_SECURITY,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "root key not loaded");
                        result = ISC_R_FAILURE;
@@ -1209,14 +1205,14 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
                result = isc_file_isdirectory(directory);
        }
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_SECURITY, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "invalid managed-keys-directory %s: %s",
                              directory, isc_result_totext(result));
                goto cleanup;
        } else if (directory != NULL) {
                if (!isc_file_isdirwritable(directory)) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "managed-keys-directory '%s' "
                                      "is not writable",
@@ -1314,7 +1310,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
        if (isc_sockaddr_getport(&sa) != 0) {
                INSIST(obj != NULL);
                if (is_firstview) {
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_INFO,
+                       cfg_obj_log(obj, ISC_LOG_INFO,
                                    "using specific query-source port "
                                    "suppresses port randomization and can be "
                                    "insecure.");
@@ -1338,8 +1334,8 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
                        return (ISC_R_SUCCESS);
                }
                isc_sockaddr_format(&sa, buf, sizeof(buf));
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "could not get query source dispatcher (%s): %s",
                              buf, isc_result_totext(result));
                return (result);
@@ -1532,7 +1528,7 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
        if (obj != NULL) {
                uint32_t padding = cfg_obj_asuint32(obj);
                if (padding > 512U) {
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "server padding value cannot "
                                    "exceed 512: lowering");
                        padding = 512U;
@@ -1649,8 +1645,8 @@ configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx,
        }
 
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "dynamic database '%s' configuration failed: %s",
                              name, isc_result_totext(result));
        }
@@ -1690,8 +1686,8 @@ disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
                        alg = ui;
                }
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(cfg_listelt_value(element), named_g_lctx,
-                                   ISC_LOG_ERROR, "invalid algorithm");
+                       cfg_obj_log(cfg_listelt_value(element), ISC_LOG_ERROR,
+                                   "invalid algorithm");
                        CHECK(result);
                }
                CHECK(dns_resolver_disable_algorithm(resolver, name, alg));
@@ -1729,8 +1725,8 @@ disable_ds_digests(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
                /* disable_ds_digests handles numeric values. */
                result = dns_dsdigest_fromtext(&digest, &r);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(cfg_listelt_value(element), named_g_lctx,
-                                   ISC_LOG_ERROR, "invalid algorithm");
+                       cfg_obj_log(cfg_listelt_value(element), ISC_LOG_ERROR,
+                                   "invalid algorithm");
                        CHECK(result);
                }
                CHECK(dns_resolver_disable_ds_digest(resolver, name, digest));
@@ -1964,9 +1960,9 @@ dns64_reverse(dns_view_t *view, isc_mem_t *mctx, isc_netaddr_t *na,
        dns_zone_setoption(zone, DNS_ZONEOPT_NOCHECKNS, true);
        setquerystats(zone, mctx, dns_zonestat_none);
        CHECK(dns_view_addzone(view, zone));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "dns64 reverse zone%s%s: %s", sep, viewname, reverse);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "dns64 reverse zone%s%s: %s", sep, viewname,
+                     reverse);
 
 cleanup:
        if (zone != NULL) {
@@ -2066,7 +2062,7 @@ conf_dnsrps_yes_no(const cfg_obj_t *obj, const char *name,
                return;
        }
        if (ctx == NULL) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "\"%s\" without \"dnsrps-enable yes\"", name);
                return;
        }
@@ -2087,7 +2083,7 @@ conf_dnsrps_num(const cfg_obj_t *obj, const char *name,
                return;
        }
        if (ctx == NULL) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "\"%s\" without \"dnsrps-enable yes\"", name);
                return;
        }
@@ -2216,8 +2212,8 @@ configure_rpz_name(dns_view_t *view, const cfg_obj_t *obj, dns_name_t *name,
        result = dns_name_fromstring(name, str, dns_rootname, DNS_NAME_DOWNCASE,
                                     view->mctx);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
-                           "invalid %s '%s'", msg, str);
+               cfg_obj_log(obj, DNS_RPZ_ERROR_LEVEL, "invalid %s '%s'", msg,
+                           str);
        }
        return (result);
 }
@@ -2230,8 +2226,7 @@ configure_rpz_name2(dns_view_t *view, const cfg_obj_t *obj, dns_name_t *name,
        result = dns_name_fromstring(name, str, origin, DNS_NAME_DOWNCASE,
                                     view->mctx);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
-                           "invalid zone '%s'", str);
+               cfg_obj_log(obj, DNS_RPZ_ERROR_LEVEL, "invalid zone '%s'", str);
        }
        return (result);
 }
@@ -2252,7 +2247,7 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
        rpz_obj = cfg_listelt_value(element);
 
        if (view->rpzs->p.num_zones >= DNS_RPZ_MAX_ZONES) {
-               cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
+               cfg_obj_log(rpz_obj, DNS_RPZ_ERROR_LEVEL,
                            "limit of %d response policy zones exceeded",
                            DNS_RPZ_MAX_ZONES);
                return (ISC_R_FAILURE);
@@ -2260,7 +2255,7 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
 
        result = dns_rpz_new_zone(view->rpzs, &zone);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
+               cfg_obj_log(rpz_obj, DNS_RPZ_ERROR_LEVEL,
                            "Error creating new RPZ zone : %s",
                            isc_result_totext(result));
                return (result);
@@ -2310,7 +2305,7 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
                return (result);
        }
        if (dns_name_equal(&zone->origin, dns_rootname)) {
-               cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
+               cfg_obj_log(rpz_obj, DNS_RPZ_ERROR_LEVEL,
                            "invalid zone name '%s'", str);
                return (DNS_R_EMPTYLABEL);
        }
@@ -2321,8 +2316,7 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
                        if (dns_name_equal(&view->rpzs->zones[rpz_num]->origin,
                                           &zone->origin))
                        {
-                               cfg_obj_log(rpz_obj, named_g_lctx,
-                                           DNS_RPZ_ERROR_LEVEL,
+                               cfg_obj_log(rpz_obj, DNS_RPZ_ERROR_LEVEL,
                                            "duplicate '%s'", str);
                                result = DNS_R_DUPLICATE;
                                return (result);
@@ -2481,7 +2475,7 @@ configure_rpz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t **maps,
        }
 #ifndef USE_DNSRPS
        if (dnsrps_enabled) {
-               cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
+               cfg_obj_log(rpz_obj, DNS_RPZ_ERROR_LEVEL,
                            "\"dnsrps-enable yes\" but"
                            " without `./configure --enable-dnsrps`");
                return (ISC_R_FAILURE);
@@ -2489,7 +2483,7 @@ configure_rpz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t **maps,
 #else  /* ifndef USE_DNSRPS */
        if (dnsrps_enabled) {
                if (librpz == NULL) {
-                       cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_ERROR_LEVEL,
+                       cfg_obj_log(rpz_obj, DNS_RPZ_ERROR_LEVEL,
                                    "\"dnsrps-enable yes\" but %s",
                                    librpz_lib_open_emsg.c);
                        return (ISC_R_FAILURE);
@@ -2652,7 +2646,7 @@ configure_rpz(dns_view_t *view, dns_view_t *pview, const cfg_obj_t **maps,
        } else if (old != NULL && pview != NULL) {
                ++pview->rpzs->rpz_ver;
                view->rpzs->rpz_ver = pview->rpzs->rpz_ver;
-               cfg_obj_log(rpz_obj, named_g_lctx, DNS_RPZ_DEBUG_LEVEL1,
+               cfg_obj_log(rpz_obj, DNS_RPZ_DEBUG_LEVEL1,
                            "updated RPZ policy: version %d",
                            view->rpzs->rpz_ver);
        }
@@ -2685,8 +2679,8 @@ catz_addmodzone_cb(void *arg) {
 
        cfg = (ns_cfgctx_t *)cz->view->new_zone_config;
        if (cfg == NULL) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "catz: allow-new-zones statement missing from "
                              "config; cannot add zone from the catalog");
                goto cleanup;
@@ -2702,8 +2696,8 @@ catz_addmodzone_cb(void *arg) {
        if (result == ISC_R_SUCCESS &&
            dnsforwarders->fwdpolicy == dns_fwdpolicy_only)
        {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING,
                              "catz: catz_addmodzone_cb: "
                              "zone '%s' will not be processed because of the "
                              "explicitly configured forwarding for that zone",
@@ -2717,7 +2711,7 @@ catz_addmodzone_cb(void *arg) {
                dns_catz_zone_t *parentcatz;
 
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "catz: error \"%s\" while trying to "
                                      "modify zone '%s'",
@@ -2726,7 +2720,7 @@ catz_addmodzone_cb(void *arg) {
                }
 
                if (!dns_zone_getadded(zone)) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "catz: catz_addmodzone_cb: "
                                      "zone '%s' is not a dynamically "
@@ -2738,7 +2732,7 @@ catz_addmodzone_cb(void *arg) {
                parentcatz = dns_zone_get_parentcatz(zone);
 
                if (parentcatz == NULL) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "catz: catz_addmodzone_cb: "
                                      "zone '%s' exists and is not added by "
@@ -2747,7 +2741,7 @@ catz_addmodzone_cb(void *arg) {
                        goto cleanup;
                }
                if (parentcatz != cz->origin) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "catz: catz_addmodzone_cb: "
                                      "zone '%s' exists in multiple "
@@ -2761,26 +2755,26 @@ catz_addmodzone_cb(void *arg) {
                /* Zone shouldn't already exist when adding */
                if (result == ISC_R_SUCCESS) {
                        if (dns_zone_get_parentcatz(zone) == NULL) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                                       "catz: "
-                                       "catz_addmodzone_cb: "
-                                       "zone '%s' will not be added "
-                                       "because it is an explicitly "
-                                       "configured zone",
-                                       nameb);
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_WARNING,
+                                             "catz: "
+                                             "catz_addmodzone_cb: "
+                                             "zone '%s' will not be added "
+                                             "because it is an explicitly "
+                                             "configured zone",
+                                             nameb);
                        } else {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                                       "catz: "
-                                       "catz_addmodzone_cb: "
-                                       "zone '%s' will not be added "
-                                       "because another catalog zone "
-                                       "already contains an entry with "
-                                       "that zone",
-                                       nameb);
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_WARNING,
+                                             "catz: "
+                                             "catz_addmodzone_cb: "
+                                             "zone '%s' will not be added "
+                                             "because another catalog zone "
+                                             "already contains an entry with "
+                                             "that zone",
+                                             nameb);
                        }
                        goto cleanup;
                } else {
@@ -2802,8 +2796,8 @@ catz_addmodzone_cb(void *arg) {
         * failed.
         */
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "catz: error \"%s\" while trying to generate "
                              "config for zone '%s'",
                              isc_result_totext(result), nameb);
@@ -2829,8 +2823,8 @@ catz_addmodzone_cb(void *arg) {
        isc_loopmgr_resume(named_g_loopmgr);
 
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING,
                              "catz: failed to configure zone '%s' - %d", nameb,
                              result);
                goto cleanup;
@@ -2846,8 +2840,8 @@ catz_addmodzone_cb(void *arg) {
        result = dns_zone_load(zone, true);
        if (result != ISC_R_SUCCESS) {
                dns_db_t *dbp = NULL;
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "catz: dns_zone_load() failed "
                              "with %s; reverting.",
                              isc_result_totext(result));
@@ -2903,8 +2897,8 @@ catz_delzone_cb(void *arg) {
        result = dns_view_findzone(cz->view, dns_catz_entry_getname(cz->entry),
                                   DNS_ZTFIND_EXACT, &zone);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING,
                              "catz: catz_delzone_cb: "
                              "zone '%s' not found",
                              cname);
@@ -2912,8 +2906,8 @@ catz_delzone_cb(void *arg) {
        }
 
        if (!dns_zone_getadded(zone)) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING,
                              "catz: catz_delzone_cb: "
                              "zone '%s' is not a dynamically added zone",
                              cname);
@@ -2921,8 +2915,8 @@ catz_delzone_cb(void *arg) {
        }
 
        if (dns_zone_get_parentcatz(zone) != cz->origin) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING,
                              "catz: catz_delzone_cb: zone "
                              "'%s' exists in multiple catalog zones",
                              cname);
@@ -2947,8 +2941,8 @@ catz_delzone_cb(void *arg) {
                }
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_WARNING,
                      "catz: catz_delzone_cb: "
                      "zone '%s' deleted",
                      cname);
@@ -3058,7 +3052,7 @@ configure_catz_zone(dns_view_t *view, dns_view_t *pview,
        }
 
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(catz_obj, named_g_lctx, DNS_CATZ_ERROR_LEVEL,
+               cfg_obj_log(catz_obj, DNS_CATZ_ERROR_LEVEL,
                            "catz: invalid zone name '%s'", str);
                goto cleanup;
        }
@@ -3095,7 +3089,7 @@ configure_catz_zone(dns_view_t *view, dns_view_t *pview,
                opts->zonedir = isc_mem_strdup(view->mctx,
                                               cfg_obj_asstring(obj));
                if (isc_file_isdirectory(opts->zonedir) != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, named_g_lctx, DNS_CATZ_ERROR_LEVEL,
+                       cfg_obj_log(obj, DNS_CATZ_ERROR_LEVEL,
                                    "catz: zone-directory '%s' "
                                    "not found; zone files will not be "
                                    "saved",
@@ -3175,14 +3169,13 @@ cleanup:
        return (result);
 }
 
-#define CHECK_RRL(cond, pat, val1, val2)                                   \
-       do {                                                               \
-               if (!(cond)) {                                             \
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR, pat, \
-                                   val1, val2);                           \
-                       result = ISC_R_RANGE;                              \
-                       goto cleanup;                                      \
-               }                                                          \
+#define CHECK_RRL(cond, pat, val1, val2)                                  \
+       do {                                                              \
+               if (!(cond)) {                                            \
+                       cfg_obj_log(obj, ISC_LOG_ERROR, pat, val1, val2); \
+                       result = ISC_R_RANGE;                             \
+                       goto cleanup;                                     \
+               }                                                         \
        } while (0)
 
 #define CHECK_RRL_RATE(rate, def, max_rate, name)                           \
@@ -3312,9 +3305,8 @@ configure_rrl(dns_view_t *view, const cfg_obj_t *config, const cfg_obj_t *map) {
        obj = NULL;
        result = cfg_map_get(map, "exempt-clients", &obj);
        if (result == ISC_R_SUCCESS) {
-               result = cfg_acl_fromconfig(obj, config, named_g_lctx,
-                                           named_g_aclconfctx, named_g_mctx, 0,
-                                           &rrl->exempt);
+               result = cfg_acl_fromconfig(obj, config, named_g_aclconfctx,
+                                           named_g_mctx, 0, &rrl->exempt);
                CHECK_RRL(result == ISC_R_SUCCESS, "invalid %s%s",
                          "address match list", "");
        }
@@ -3576,9 +3568,9 @@ create_empty_zone(dns_zone_t *pzone, dns_name_t *name, dns_view_t *view,
                viewname = "";
        }
        dns_name_format(name, namebuf, sizeof(namebuf));
-       isc_log_write(named_g_lctx, DNS_LOGCATEGORY_ZONELOAD,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "automatic empty zone%s%s: %s", sep, viewname, namebuf);
+       isc_log_write(DNS_LOGCATEGORY_ZONELOAD, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "automatic empty zone%s%s: %s", sep,
+                     viewname, namebuf);
 
 cleanup:
        if (zone != NULL) {
@@ -3663,10 +3655,9 @@ create_ipv4only_zone(dns_zone_t *pzone, dns_view_t *view,
        CHECK(dns_view_addzone(view, zone));
 
        dns_name_format(name, namebuf, sizeof(namebuf));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "automatic ipv4only zone%s%s: %s", sep, viewname,
-                     namebuf);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "automatic ipv4only zone%s%s: %s", sep,
+                     viewname, namebuf);
 
 cleanup:
        if (zone != NULL) {
@@ -3765,7 +3756,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) {
                if (obj2 != NULL && cfg_obj_isuint64(obj2)) {
                        max_size = cfg_obj_asuint64(obj2);
                        if (max_size > SIZE_MAX) {
-                               cfg_obj_log(obj2, named_g_lctx, ISC_LOG_WARNING,
+                               cfg_obj_log(obj2, ISC_LOG_WARNING,
                                            "'dnstap-output size "
                                            "%" PRIu64 "' "
                                            "is too large for this "
@@ -3943,8 +3934,8 @@ register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
        result = ns_plugin_expandpath(plugin_path, full_path,
                                      sizeof(full_path));
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "%s: plugin configuration failed: "
                              "unable to get full plugin path: %s",
                              plugin_path, isc_result_totext(result));
@@ -3953,11 +3944,10 @@ register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
 
        result = ns_plugin_register(full_path, parameters, config,
                                    cfg_obj_file(obj), cfg_obj_line(obj),
-                                   named_g_mctx, named_g_lctx,
-                                   named_g_aclconfctx, view);
+                                   named_g_mctx, named_g_aclconfctx, view);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "%s: plugin configuration failed: %s", full_path,
                              isc_result_totext(result));
        }
@@ -4129,7 +4119,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
        if (view->rdclass != dns_rdataclass_in && need_hints &&
            named_config_get(maps, "catalog-zones", &obj) == ISC_R_SUCCESS)
        {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "'catalog-zones' option is only supported "
                            "for views with class IN");
        }
@@ -4179,8 +4169,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
 
                                dns_name_format(&view->rpzs->zones[n]->origin,
                                                namebuf, sizeof(namebuf));
-                               isc_log_write(named_g_lctx,
-                                             NAMED_LOGCATEGORY_GENERAL,
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                              NAMED_LOGMODULE_SERVER,
                                              DNS_RPZ_ERROR_LEVEL,
                                              "rpz '%s' is not a primary or a "
@@ -4299,7 +4288,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
        } else {
                uint64_t value = cfg_obj_asuint64(obj);
                if (value > SIZE_MAX) {
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "'max-cache-size "
                                    "%" PRIu64 "' "
                                    "is too large for this "
@@ -4316,12 +4305,12 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                max_cache_size =
                        (size_t)(totalphys * max_cache_size_percent / 100);
                if (totalphys == 0) {
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "Unable to determine amount of physical "
                                    "memory, setting 'max-cache-size' to "
                                    "unlimited");
                } else {
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_INFO,
+                       cfg_obj_log(obj, ISC_LOG_INFO,
                                    "'max-cache-size %d%%' "
                                    "- setting to %" PRIu64 "MB "
                                    "(out of %" PRIu64 "MB)",
@@ -4410,8 +4399,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                        obj = NULL;
                        (void)cfg_map_get(map, "clients", &obj);
                        if (obj != NULL) {
-                               result = cfg_acl_fromconfig(obj, config,
-                                                           named_g_lctx, actx,
+                               result = cfg_acl_fromconfig(obj, config, actx,
                                                            mctx, 0, &clients);
                                if (result != ISC_R_SUCCESS) {
                                        goto cleanup;
@@ -4420,8 +4408,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                        obj = NULL;
                        (void)cfg_map_get(map, "mapped", &obj);
                        if (obj != NULL) {
-                               result = cfg_acl_fromconfig(obj, config,
-                                                           named_g_lctx, actx,
+                               result = cfg_acl_fromconfig(obj, config, actx,
                                                            mctx, 0, &mapped);
                                if (result != ISC_R_SUCCESS) {
                                        goto cleanup;
@@ -4430,8 +4417,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                        obj = NULL;
                        (void)cfg_map_get(map, "exclude", &obj);
                        if (obj != NULL) {
-                               result = cfg_acl_fromconfig(obj, config,
-                                                           named_g_lctx, actx,
+                               result = cfg_acl_fromconfig(obj, config, actx,
                                                            mctx, 0, &excluded);
                                if (result != ISC_R_SUCCESS) {
                                        goto cleanup;
@@ -4587,7 +4573,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                if (view->staleanswerclienttimeout != 0) {
                        view->staleanswerclienttimeout = 0;
                        isc_log_write(
-                               named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                               NAMED_LOGCATEGORY_GENERAL,
                                NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                "BIND 9 no longer supports non-zero values of "
                                "stale-answer-client-timeout, adjusted to 0");
@@ -4636,7 +4622,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                                    max_cache_size, max_stale_ttl,
                                    stale_refresh_time))
                {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "views %s and %s can't share the cache "
                                      "due to configuration parameter mismatch",
@@ -4659,8 +4645,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                                if (!cache_reusable(pview, view,
                                                    zero_no_soattl))
                                {
-                                       isc_log_write(named_g_lctx,
-                                                     NAMED_LOGCATEGORY_GENERAL,
+                                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                                      NAMED_LOGMODULE_SERVER,
                                                      ISC_LOG_DEBUG(1),
                                                      "cache cannot be reused "
@@ -4670,8 +4655,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                                                      view->name);
                                } else {
                                        INSIST(pview->cache != NULL);
-                                       isc_log_write(named_g_lctx,
-                                                     NAMED_LOGCATEGORY_GENERAL,
+                                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                                      NAMED_LOGMODULE_SERVER,
                                                      ISC_LOG_DEBUG(3),
                                                      "reusing existing cache");
@@ -4840,7 +4824,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
        INSIST(result == ISC_R_SUCCESS);
        lame_ttl = cfg_obj_asduration(obj);
        if (lame_ttl > 0) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "disabling lame cache despite lame-ttl > 0 as it "
                            "may cause performance issues");
                lame_ttl = 0;
@@ -4992,7 +4976,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                        need_hints = false;
                }
                if (need_hints) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "no root hints for view '%s'",
                                      view->name);
@@ -5446,14 +5430,14 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                uint32_t padding = cfg_obj_asuint32(padobj);
 
                if (padding > 512U) {
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "response-padding block-size cannot "
                                    "exceed 512: lowering");
                        padding = 512U;
                }
                view->padding = (uint16_t)padding;
-               CHECK(cfg_acl_fromconfig(aclobj, config, named_g_lctx, actx,
-                                        named_g_mctx, 0, &view->pad_acl));
+               CHECK(cfg_acl_fromconfig(aclobj, config, actx, named_g_mctx, 0,
+                                        &view->pad_acl));
        }
 
        obj = NULL;
@@ -5629,8 +5613,8 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
 
                if (dctx == NULL) {
                        const void *hashinit = isc_hash_get_initializer();
-                       CHECK(dns_dyndb_createctx(mctx, hashinit, named_g_lctx,
-                                                 view, named_g_server->zonemgr,
+                       CHECK(dns_dyndb_createctx(mctx, hashinit, view,
+                                                 named_g_server->zonemgr,
                                                  named_g_loopmgr, &dctx));
                }
 
@@ -5656,7 +5640,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
                ns_plugins_create(view->mctx, (ns_plugins_t **)&view->plugins);
                view->plugins_free = ns_plugins_free;
 
-               CHECK(cfg_pluginlist_foreach(config, plugin_list, named_g_lctx,
+               CHECK(cfg_pluginlist_foreach(config, plugin_list,
                                             register_one_plugin, view));
        }
 
@@ -6006,8 +5990,7 @@ cleanup:
                                result2 = configure_rpz(pview, view, maps, obj,
                                                        &old_rpz_ok);
                                if (result2 != ISC_R_SUCCESS) {
-                                       isc_log_write(named_g_lctx,
-                                                     NAMED_LOGCATEGORY_GENERAL,
+                                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                                      NAMED_LOGMODULE_SERVER,
                                                      ISC_LOG_ERROR,
                                                      "rpz configuration "
@@ -6032,8 +6015,7 @@ cleanup:
                                result2 = configure_catz(pview, view, config,
                                                         obj);
                                if (result2 != ISC_R_SUCCESS) {
-                                       isc_log_write(named_g_lctx,
-                                                     NAMED_LOGCATEGORY_GENERAL,
+                                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                                      NAMED_LOGMODULE_SERVER,
                                                      ISC_LOG_ERROR,
                                                      "catz configuration "
@@ -6146,8 +6128,7 @@ configure_alternates(const cfg_obj_t *config, dns_view_t *view,
                if (cfg_obj_isuint32(portobj)) {
                        uint32_t val = cfg_obj_asuint32(portobj);
                        if (val > UINT16_MAX) {
-                               cfg_obj_log(portobj, named_g_lctx,
-                                           ISC_LOG_ERROR,
+                               cfg_obj_log(portobj, ISC_LOG_ERROR,
                                            "port '%u' out of range", val);
                                return (ISC_R_RANGE);
                        }
@@ -6184,8 +6165,7 @@ configure_alternates(const cfg_obj_t *config, dns_view_t *view,
                        if (cfg_obj_isuint32(portobj)) {
                                uint32_t val = cfg_obj_asuint32(portobj);
                                if (val > UINT16_MAX) {
-                                       cfg_obj_log(portobj, named_g_lctx,
-                                                   ISC_LOG_ERROR,
+                                       cfg_obj_log(portobj, ISC_LOG_ERROR,
                                                    "port '%u' out of range",
                                                    val);
                                        return (ISC_R_RANGE);
@@ -6210,15 +6190,15 @@ cleanup:
 
 static isc_result_t
 validate_tls(const cfg_obj_t *config, dns_view_t *view, const cfg_obj_t *obj,
-            isc_log_t *logctx, const char *str, dns_name_t **name) {
+            const char *str, dns_name_t **name) {
        dns_fixedname_t fname;
        dns_name_t *nm = dns_fixedname_initname(&fname);
        isc_result_t result = dns_name_fromstring(nm, str, dns_rootname, 0,
                                                  NULL);
 
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
-                           "'%s' is not a valid name", str);
+               cfg_obj_log(obj, ISC_LOG_ERROR, "'%s' is not a valid name",
+                           str);
                return (result);
        }
 
@@ -6226,7 +6206,7 @@ validate_tls(const cfg_obj_t *config, dns_view_t *view, const cfg_obj_t *obj,
                const cfg_obj_t *tlsmap = find_maplist(config, "tls", str);
 
                if (tlsmap == NULL) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "tls '%s' is not defined", str);
                        return (ISC_R_FAILURE);
                }
@@ -6270,8 +6250,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
                if (cfg_obj_isuint32(portobj)) {
                        uint32_t val = cfg_obj_asuint32(portobj);
                        if (val > UINT16_MAX) {
-                               cfg_obj_log(portobj, named_g_lctx,
-                                           ISC_LOG_ERROR,
+                               cfg_obj_log(portobj, ISC_LOG_ERROR,
                                            "port '%u' out of range", val);
                                return (ISC_R_RANGE);
                        }
@@ -6288,7 +6267,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
                        tls = cfg_obj_asstring(tlspobj);
                        if (tls != NULL) {
                                result = validate_tls(config, view, tlspobj,
-                                                     named_g_lctx, tls, NULL);
+                                                     tls, NULL);
                                if (result != ISC_R_SUCCESS) {
                                        return (result);
                                }
@@ -6314,8 +6293,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
                        cur_tls = tls;
                }
                if (cur_tls != NULL) {
-                       result = validate_tls(config, view, faddresses,
-                                             named_g_lctx, cur_tls,
+                       result = validate_tls(config, view, faddresses, cur_tls,
                                              &fwd->tlsname);
                        if (result != ISC_R_SUCCESS) {
                                isc_mem_put(view->mctx, fwd,
@@ -6334,7 +6312,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
 
        if (ISC_LIST_EMPTY(fwdlist)) {
                if (forwardtype != NULL) {
-                       cfg_obj_log(forwardtype, named_g_lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(forwardtype, ISC_LOG_WARNING,
                                    "no forwarders seen; disabling "
                                    "forwarding");
                }
@@ -6359,7 +6337,7 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
        if (result != ISC_R_SUCCESS) {
                char namebuf[DNS_NAME_FORMATSIZE];
                dns_name_format(origin, namebuf, sizeof(namebuf));
-               cfg_obj_log(forwarders, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(forwarders, ISC_LOG_WARNING,
                            "could not set up forwarding for domain '%s': %s",
                            namebuf, isc_result_totext(result));
                goto cleanup;
@@ -6405,7 +6383,7 @@ get_viewinfo(const cfg_obj_t *vconfig, const char **namep,
                CHECK(named_config_getclass(classobj, dns_rdataclass_in,
                                            &viewclass));
                if (dns_rdataclass_ismeta(viewclass)) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "view '%s': class must not be meta",
                                      viewname);
@@ -6553,8 +6531,8 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
                        vname = "<default view>";
                }
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "zone '%s': wrong class for view '%s'", zname,
                              vname);
                result = ISC_R_FAILURE;
@@ -6567,7 +6545,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
                dns_view_t *otherview = NULL;
 
                if (viewlist == NULL) {
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "'in-view' option is not permitted in "
                                    "dynamically added zones");
                        result = ISC_R_FAILURE;
@@ -6577,7 +6555,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
                result = dns_viewlist_find(viewlist, inview, view->rdclass,
                                           &otherview);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "view '%s' is not yet defined.", inview);
                        result = ISC_R_FAILURE;
                        goto cleanup;
@@ -6587,7 +6565,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
                                           &zone);
                dns_view_detach(&otherview);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "zone '%s' not defined in view '%s'", zname,
                                    inview);
                        result = ISC_R_FAILURE;
@@ -6616,7 +6594,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
 
        (void)cfg_map_get(zoptions, "type", &typeobj);
        if (typeobj == NULL) {
-               cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+               cfg_obj_log(zconfig, ISC_LOG_ERROR,
                            "zone '%s' 'type' not specified", zname);
                result = ISC_R_FAILURE;
                goto cleanup;
@@ -6630,7 +6608,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
        if (strcasecmp(ztypestr, "hint") == 0) {
                const cfg_obj_t *fileobj = NULL;
                if (cfg_map_get(zoptions, "file", &fileobj) != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "zone '%s': 'file' not specified", zname);
                        result = ISC_R_FAILURE;
@@ -6641,7 +6619,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
 
                        CHECK(configure_hints(view, hintsfile));
                } else {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "ignoring non-root hint zone '%s'",
                                      zname);
@@ -6671,7 +6649,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
         */
        if (strcasecmp(ztypestr, "redirect") == 0) {
                if (view->redirect != NULL) {
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "redirect zone already exists");
                        result = ISC_R_EXISTS;
                        goto cleanup;
@@ -6709,7 +6687,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
                        /*
                         * We already have this zone!
                         */
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "zone '%s' already exists", zname);
                        dns_zone_detach(&dupzone);
                        result = ISC_R_EXISTS;
@@ -6800,7 +6778,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
        if (rpz_num != DNS_RPZ_INVALID_NUM) {
                result = dns_zone_rpz_enable(zone, view->rpzs, rpz_num);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "zone '%s': incompatible"
                                      " masterfile-format or database"
@@ -6858,7 +6836,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
                if (cfg_map_get(zoptions, "ixfr-from-differences",
                                &ixfrfromdiffs) == ISC_R_SUCCESS)
                {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "zone '%s': 'ixfr-from-differences' is "
                                      "ignored for inline-signed zones",
@@ -6985,8 +6963,8 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
        }
        dns_zone_attach(zone, &view->managed_keys);
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO,
                      "set up managed keys zone for view %s, file '%s'",
                      view->name, filename);
 
@@ -7035,21 +7013,21 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
        directory = cfg_obj_asstring(obj);
 
        if (!isc_file_ischdiridempotent(directory)) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "option 'directory' contains relative path '%s'",
                            directory);
        }
 
        if (!isc_file_isdirwritable(directory)) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "directory '%s' is not writable", directory);
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "directory '%s' is not writable",
+                             directory);
                return (ISC_R_NOPERM);
        }
 
        result = isc_dir_chdir(directory);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "change directory to '%s' failed: %s", directory,
                            isc_result_totext(result));
                return (result);
@@ -7229,8 +7207,8 @@ tat_send(void *arg) {
        tatname = dns_fixedname_name(&tat->tatname);
 
        dns_name_format(tatname, namebuf, sizeof(namebuf));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO,
                      "%s: sending trust-anchor-telemetry query '%s/NULL'",
                      tat->view->name, namebuf);
 
@@ -7498,9 +7476,8 @@ generate_session_key(const char *filename, const char *keynamestr,
        isc_region_t key_rawregion;
        FILE *fp = NULL;
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "generating session key for dynamic DNS");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "generating session key for dynamic DNS");
 
        /* generate key */
        result = dst_key_generate(keyname, alg, bits, 1, 0, DNS_KEYPROTO_ANY,
@@ -7522,9 +7499,8 @@ generate_session_key(const char *filename, const char *keynamestr,
        /* Dump the key to the key file. */
        fp = named_os_openfile(filename, S_IRUSR | S_IWUSR, first_time);
        if (fp == NULL) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "could not create %s", filename);
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "could not create %s", filename);
                result = ISC_R_NOPERM;
                goto cleanup;
        }
@@ -7547,8 +7523,8 @@ generate_session_key(const char *filename, const char *keynamestr,
        return (ISC_R_SUCCESS);
 
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR,
                      "failed to generate session key "
                      "for dynamic DNS: %s",
                      isc_result_totext(result));
@@ -7609,7 +7585,7 @@ configure_session_key(const cfg_obj_t **maps, named_server_t *server,
        if (result != ISC_R_SUCCESS) {
                const char *s = " (keeping current key)";
 
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "session-keyalg: "
                            "unsupported or unknown algorithm '%s'%s",
                            algstr, server->session_keyfile != NULL ? s : "");
@@ -7707,14 +7683,14 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
                dir = cfg_obj_asstring(nzdir);
                result = isc_file_isdirectory(dir);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
+                       isc_log_write(DNS_LOGCATEGORY_SECURITY,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "invalid new-zones-directory %s: %s", dir,
                                      isc_result_totext(result));
                        return (result);
                }
                if (!isc_file_isdirwritable(dir)) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "new-zones-directory '%s' "
                                      "is not writable",
@@ -7730,14 +7706,14 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
        if (result == ISC_R_SUCCESS && obj != NULL) {
                mapsize = cfg_obj_asuint64(obj);
                if (mapsize < (1ULL << 20)) { /* 1 megabyte */
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'lmdb-mapsize "
                                    "%" PRId64 "' "
                                    "is too small",
                                    mapsize);
                        return (ISC_R_FAILURE);
                } else if (mapsize > (1ULL << 40)) { /* 1 terabyte */
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'lmdb-mapsize "
                                    "%" PRId64 "' "
                                    "is too large",
@@ -7857,9 +7833,9 @@ configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
                return (ISC_R_SUCCESS);
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "loading additional zones for view '%s'", view->name);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "loading additional zones for view '%s'",
+                     view->name);
 
        zonelist = NULL;
        cfg_map_get(nzctx->nzf_config, "zone", &zonelist);
@@ -7941,8 +7917,8 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data, isc_buffer_t **text,
        result = cfg_parse_buffer(named_g_addparser, *text, bufname, 0,
                                  &cfg_type_addzoneconf, 0, &zoneconf);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "parsing config for zone '%.*s' in "
                              "NZD database '%s' failed",
                              (int)zone_name_len, zone_name, view->new_zone_db);
@@ -8095,8 +8071,8 @@ configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
                return (ISC_R_SUCCESS);
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO,
                      "loading NZD configs from '%s' "
                      "for view '%s'",
                      view->new_zone_db, view->name);
@@ -8144,8 +8120,8 @@ get_newzone_config(dns_view_t *view, const char *zonename,
 
        CHECK(nzd_open(view, MDB_RDONLY, &txn, &dbi));
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO,
                      "loading NZD config from '%s' "
                      "for zone '%s'",
                      view->new_zone_db, zonename);
@@ -8289,10 +8265,10 @@ load_configuration(const char *filename, named_server_t *server,
         * Parse the configuration file using the new config code.
         */
        config = NULL;
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "loading configuration from '%s'", filename);
-       result = cfg_parser_create(named_g_mctx, named_g_lctx, &conf_parser);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "loading configuration from '%s'",
+                     filename);
+       result = cfg_parser_create(named_g_mctx, &conf_parser);
        if (result != ISC_R_SUCCESS) {
                goto cleanup_exclusive;
        }
@@ -8312,7 +8288,7 @@ load_configuration(const char *filename, named_server_t *server,
         * registered.)
         */
        result = isccfg_check_namedconf(config, BIND_CHECK_ALGORITHMS,
-                                       named_g_lctx, named_g_mctx);
+                                       named_g_mctx);
        if (result != ISC_R_SUCCESS) {
                goto cleanup_config;
        }
@@ -8379,13 +8355,13 @@ load_configuration(const char *filename, named_server_t *server,
                setstring(server, &server->bindkeysfile, cfg_obj_asstring(obj));
                INSIST(server->bindkeysfile != NULL);
                if (access(server->bindkeysfile, R_OK) != 0) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "unable to open '%s'; using built-in "
                                      "keys instead",
                                      server->bindkeysfile);
                } else {
-                       result = cfg_parser_create(named_g_mctx, named_g_lctx,
+                       result = cfg_parser_create(named_g_mctx,
                                                   &bindkeys_parser);
                        if (result != ISC_R_SUCCESS) {
                                goto cleanup_config;
@@ -8395,14 +8371,14 @@ load_configuration(const char *filename, named_server_t *server,
                                                server->bindkeysfile,
                                                &cfg_type_bindkeys, &bindkeys);
                        if (result != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                                       "unable to parse '%s' "
-                                       "error '%s'; using "
-                                       "built-in keys instead",
-                                       server->bindkeysfile,
-                                       isc_result_totext(result));
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_INFO,
+                                             "unable to parse '%s' "
+                                             "error '%s'; using "
+                                             "built-in keys instead",
+                                             server->bindkeysfile,
+                                             isc_result_totext(result));
                        }
                }
        } else {
@@ -8447,7 +8423,7 @@ load_configuration(const char *filename, named_server_t *server,
        if (max > 1000) {
                unsigned int margin = ISC_MAX(100, named_g_cpus + 1);
                if (margin + 100 > max) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "'recursive-clients %d' too low when "
                                      "running with %d worker threads",
@@ -8466,8 +8442,8 @@ load_configuration(const char *filename, named_server_t *server,
        result = named_config_get(maps, "sig0checks-quota-exempt", &obj);
        if (result == ISC_R_SUCCESS) {
                result = cfg_acl_fromconfig(
-                       obj, config, named_g_lctx, named_g_aclconfctx,
-                       named_g_mctx, 0, &server->sctx->sig0checksquota_exempt);
+                       obj, config, named_g_aclconfctx, named_g_mctx, 0,
+                       &server->sctx->sig0checksquota_exempt);
                INSIST(result == ISC_R_SUCCESS);
        }
 
@@ -8500,13 +8476,13 @@ load_configuration(const char *filename, named_server_t *server,
        INSIST(result == ISC_R_SUCCESS);
        initial = cfg_obj_asuint32(obj) * 100;
        if (initial > MAX_INITIAL_TIMEOUT) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "tcp-initial-timeout value is out of range: "
                            "lowering to %" PRIu32,
                            MAX_INITIAL_TIMEOUT / 100);
                initial = MAX_INITIAL_TIMEOUT;
        } else if (initial < MIN_INITIAL_TIMEOUT) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "tcp-initial-timeout value is out of range: "
                            "raising to %" PRIu32,
                            MIN_INITIAL_TIMEOUT / 100);
@@ -8518,13 +8494,13 @@ load_configuration(const char *filename, named_server_t *server,
        INSIST(result == ISC_R_SUCCESS);
        idle = cfg_obj_asuint32(obj) * 100;
        if (idle > MAX_IDLE_TIMEOUT) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "tcp-idle-timeout value is out of range: "
                            "lowering to %" PRIu32,
                            MAX_IDLE_TIMEOUT / 100);
                idle = MAX_IDLE_TIMEOUT;
        } else if (idle < MIN_IDLE_TIMEOUT) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "tcp-idle-timeout value is out of range: "
                            "raising to %" PRIu32,
                            MIN_IDLE_TIMEOUT / 100);
@@ -8536,13 +8512,13 @@ load_configuration(const char *filename, named_server_t *server,
        INSIST(result == ISC_R_SUCCESS);
        keepalive = cfg_obj_asuint32(obj) * 100;
        if (keepalive > MAX_KEEPALIVE_TIMEOUT) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "tcp-keepalive-timeout value is out of range: "
                            "lowering to %" PRIu32,
                            MAX_KEEPALIVE_TIMEOUT / 100);
                keepalive = MAX_KEEPALIVE_TIMEOUT;
        } else if (keepalive < MIN_KEEPALIVE_TIMEOUT) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "tcp-keepalive-timeout value is out of range: "
                            "raising to %" PRIu32,
                            MIN_KEEPALIVE_TIMEOUT / 100);
@@ -8554,7 +8530,7 @@ load_configuration(const char *filename, named_server_t *server,
        INSIST(result == ISC_R_SUCCESS);
        advertised = cfg_obj_asuint32(obj) * 100;
        if (advertised > MAX_ADVERTISED_TIMEOUT) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "tcp-advertized-timeout value is out of range: "
                            "lowering to %" PRIu32,
                            MAX_ADVERTISED_TIMEOUT / 100);
@@ -8607,17 +8583,15 @@ load_configuration(const char *filename, named_server_t *server,
         */
        result = isc_portset_create(named_g_mctx, &v4portset);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "creating UDP/IPv4 port set: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "creating UDP/IPv4 port set: %s",
                              isc_result_totext(result));
                goto cleanup_bindkeys_parser;
        }
        result = isc_portset_create(named_g_mctx, &v6portset);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "creating UDP/IPv6 port set: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "creating UDP/IPv6 port set: %s",
                              isc_result_totext(result));
                goto cleanup_v4portset;
        }
@@ -8634,7 +8608,7 @@ load_configuration(const char *filename, named_server_t *server,
                result = isc_net_getudpportrange(AF_INET, &udpport_low,
                                                 &udpport_high);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "get the default UDP/IPv4 port range: %s",
                                      isc_result_totext(result));
@@ -8648,7 +8622,7 @@ load_configuration(const char *filename, named_server_t *server,
                                             udpport_high);
                }
                if (!ns_server_getoption(server->sctx, NS_SERVER_DISABLE4)) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "using default UDP/IPv4 port range: "
                                      "[%d, %d]",
@@ -8667,7 +8641,7 @@ load_configuration(const char *filename, named_server_t *server,
                result = isc_net_getudpportrange(AF_INET6, &udpport_low,
                                                 &udpport_high);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "get the default UDP/IPv6 port range: %s",
                                      isc_result_totext(result));
@@ -8680,7 +8654,7 @@ load_configuration(const char *filename, named_server_t *server,
                                             udpport_high);
                }
                if (!ns_server_getoption(server->sctx, NS_SERVER_DISABLE6)) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "using default UDP/IPv6 port range: "
                                      "[%d, %d]",
@@ -8787,12 +8761,12 @@ load_configuration(const char *filename, named_server_t *server,
        } else if (loadbalancesockets !=
                   isc_nm_getloadbalancesockets(named_g_netmgr))
        {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "changing reuseport value requires server restart");
        }
 #else
        if (loadbalancesockets) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "reuseport has no effect on this system");
        }
 #endif
@@ -8885,7 +8859,7 @@ load_configuration(const char *filename, named_server_t *server,
                 * and we should fail.
                 */
                if (result == ISC_R_ADDRINUSE) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "unable to listen on any configured "
                                      "interfaces");
@@ -8922,7 +8896,7 @@ load_configuration(const char *filename, named_server_t *server,
                         * that from the configuration options.
                         */
                        isc_log_write(
-                               named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                               NAMED_LOGCATEGORY_GENERAL,
                                NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                "Disabling periodic interface re-scans timer");
                        server->interface_interval = 0;
@@ -8992,8 +8966,8 @@ load_configuration(const char *filename, named_server_t *server,
        /*
         * Create the built-in key store ("key-directory").
         */
-       result = cfg_keystore_fromconfig(NULL, named_g_mctx, named_g_lctx,
-                                        &keystorelist, NULL);
+       result = cfg_keystore_fromconfig(NULL, named_g_mctx, &keystorelist,
+                                        NULL);
        if (result != ISC_R_SUCCESS) {
                goto cleanup_keystorelist;
        }
@@ -9009,8 +8983,7 @@ load_configuration(const char *filename, named_server_t *server,
                cfg_obj_t *kconfig = cfg_listelt_value(element);
                keystore = NULL;
                result = cfg_keystore_fromconfig(kconfig, named_g_mctx,
-                                                named_g_lctx, &keystorelist,
-                                                NULL);
+                                                &keystorelist, NULL);
                if (result != ISC_R_SUCCESS) {
                        goto cleanup_keystorelist;
                }
@@ -9028,8 +9001,8 @@ load_configuration(const char *filename, named_server_t *server,
 
                kasp = NULL;
                result = cfg_kasp_fromconfig(kconfig, default_kasp, true,
-                                            named_g_mctx, named_g_lctx,
-                                            &keystorelist, &kasplist, &kasp);
+                                            named_g_mctx, &keystorelist,
+                                            &kasplist, &kasp);
                if (result != ISC_R_SUCCESS) {
                        goto cleanup_kasplist;
                }
@@ -9057,8 +9030,8 @@ load_configuration(const char *filename, named_server_t *server,
                cfg_obj_t *kconfig = cfg_listelt_value(element);
                kasp = NULL;
                result = cfg_kasp_fromconfig(kconfig, default_kasp, true,
-                                            named_g_mctx, named_g_lctx,
-                                            &keystorelist, &kasplist, &kasp);
+                                            named_g_mctx, &keystorelist,
+                                            &kasplist, &kasp);
                if (result != ISC_R_SUCCESS) {
                        goto cleanup_kasplist;
                }
@@ -9092,8 +9065,8 @@ load_configuration(const char *filename, named_server_t *server,
                }
                setstring(server, &server->dnsrpslib, cfg_obj_asstring(obj));
                result = dns_dnsrps_server_create(server->dnsrpslib);
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_DEBUG(1),
                              "initializing DNSRPS RPZ provider '%s': %s",
                              server->dnsrpslib, isc_result_totext(result));
                /*
@@ -9277,7 +9250,7 @@ load_configuration(const char *filename, named_server_t *server,
                result = named_tkeyctx_fromconfig(options, named_g_mctx,
                                                  &tkeyctx);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "configuring TKEY: %s",
                                      isc_result_totext(result));
@@ -9316,8 +9289,8 @@ load_configuration(const char *filename, named_server_t *server,
         * Check that the working directory is writable.
         */
        if (!isc_file_isdirwritable(".")) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "the working directory is not writable");
                result = ISC_R_NOPERM;
                goto cleanup_cachelist;
@@ -9346,8 +9319,8 @@ load_configuration(const char *filename, named_server_t *server,
        if (named_g_logstderr) {
                const cfg_obj_t *logobj = NULL;
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO,
                              "not using config file logging "
                              "statement for logging due to "
                              "-g option");
@@ -9356,30 +9329,30 @@ load_configuration(const char *filename, named_server_t *server,
                if (logobj != NULL) {
                        result = named_logconfig(NULL, logobj);
                        if (result != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                                       "checking logging configuration "
-                                       "failed: %s",
-                                       isc_result_totext(result));
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_ERROR,
+                                             "checking logging configuration "
+                                             "failed: %s",
+                                             isc_result_totext(result));
                                goto cleanup_cachelist;
                        }
                }
        } else {
                const cfg_obj_t *logobj = NULL;
 
-               isc_logconfig_create(named_g_lctx, &logc);
+               isc_logconfig_create(&logc);
 
                logobj = NULL;
                (void)cfg_map_get(config, "logging", &logobj);
                if (logobj != NULL) {
                        result = named_logconfig(logc, logobj);
                        if (result != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                                       "configuring logging: %s",
-                                       isc_result_totext(result));
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_ERROR,
+                                             "configuring logging: %s",
+                                             isc_result_totext(result));
                                goto cleanup_logc;
                        }
                } else {
@@ -9387,31 +9360,31 @@ load_configuration(const char *filename, named_server_t *server,
                        named_log_setdefaultsslkeylogfile(logc);
                        result = named_log_setunmatchedcategory(logc);
                        if (result != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                                       "setting up default 'category "
-                                       "unmatched': %s",
-                                       isc_result_totext(result));
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_ERROR,
+                                             "setting up default 'category "
+                                             "unmatched': %s",
+                                             isc_result_totext(result));
                                goto cleanup_logc;
                        }
                        result = named_log_setdefaultcategory(logc);
                        if (result != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                                       "setting up default 'category "
-                                       "default': %s",
-                                       isc_result_totext(result));
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_ERROR,
+                                             "setting up default 'category "
+                                             "default': %s",
+                                             isc_result_totext(result));
                                goto cleanup_logc;
                        }
                }
 
-               isc_logconfig_set(named_g_lctx, logc);
+               isc_logconfig_set(logc);
                logc = NULL;
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_DEBUG(1),
                              "now using logging configuration from "
                              "config file");
        }
@@ -9606,7 +9579,6 @@ load_configuration(const char *filename, named_server_t *server,
                                if (usedlength != expectedlength) {
                                        result = ISC_R_RANGE;
                                        isc_log_write(
-                                               named_g_lctx,
                                                NAMED_LOGCATEGORY_GENERAL,
                                                NAMED_LOGMODULE_SERVER,
                                                ISC_LOG_ERROR,
@@ -9660,8 +9632,8 @@ load_configuration(const char *filename, named_server_t *server,
        result = named_statschannels_configure(named_g_server, config,
                                               named_g_aclconfctx);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "configuring statistics server(s): %s",
                              isc_result_totext(result));
                goto cleanup_altsecrets;
@@ -9673,9 +9645,8 @@ load_configuration(const char *filename, named_server_t *server,
        result = named_controls_configure(named_g_server->controls, config,
                                          named_g_aclconfctx);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "binding control channel(s): %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "binding control channel(s): %s",
                              isc_result_totext(result));
                goto cleanup_altsecrets;
        }
@@ -9763,9 +9734,9 @@ cleanup_exclusive:
                isc_loopmgr_resume(named_g_loopmgr);
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
-                     "load_configuration: %s", isc_result_totext(result));
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_DEBUG(1), "load_configuration: %s",
+                     isc_result_totext(result));
 
        return (result);
 }
@@ -9797,12 +9768,12 @@ view_loaded(void *arg) {
                 * as it is
                 */
                if (reconfig) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "any newly configured zones are now "
                                      "loaded");
                } else {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
                                      "all zones loaded");
                }
@@ -9815,7 +9786,6 @@ view_loaded(void *arg) {
                                        view->managed_keys);
                                if (result != ISC_R_SUCCESS) {
                                        isc_log_write(
-                                               named_g_lctx,
                                                DNS_LOGCATEGORY_DNSSEC,
                                                DNS_LOGMODULE_DNSSEC,
                                                ISC_LOG_ERROR,
@@ -9834,9 +9804,8 @@ view_loaded(void *arg) {
 
                named_os_started();
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
-                             "FIPS mode is %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_NOTICE, "FIPS mode is %s",
                              isc_fips_mode() ? "enabled" : "disabled");
 
 #if HAVE_LIBSYSTEMD
@@ -9849,9 +9818,8 @@ view_loaded(void *arg) {
 
                atomic_store(&server->reload_status, NAMED_RELOAD_DONE);
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
-                             "running");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_NOTICE, "running");
        }
 
        return (ISC_R_SUCCESS);
@@ -9957,12 +9925,10 @@ run_server(void *arg) {
        isc_timer_create(named_g_mainloop, pps_timer_tick, server,
                         &server->pps_timer);
 
-       CHECKFATAL(
-               cfg_parser_create(named_g_mctx, named_g_lctx, &named_g_parser),
-               "creating default configuration parser");
+       CHECKFATAL(cfg_parser_create(named_g_mctx, &named_g_parser),
+                  "creating default configuration parser");
 
-       CHECKFATAL(cfg_parser_create(named_g_mctx, named_g_lctx,
-                                    &named_g_addparser),
+       CHECKFATAL(cfg_parser_create(named_g_mctx, &named_g_addparser),
                   "creating additional configuration parser");
 
        CHECKFATAL(load_configuration(named_g_conffile, server, true),
@@ -10012,8 +9978,8 @@ shutdown_server(void *arg) {
 
        isc_loopmgr_pause(named_g_loopmgr);
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO, "shutting down%s",
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "shutting down%s",
                      flush ? ": flushing changes" : "");
 
        cleanup_session_key(server, server->mctx);
@@ -10461,12 +10427,11 @@ fatal(const char *msg, isc_result_t result) {
        if (named_g_loopmgr_running) {
                isc_loopmgr_pause(named_g_loopmgr);
        }
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_CRITICAL, "%s: %s", msg,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_CRITICAL, "%s: %s", msg,
                      isc_result_totext(result));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_CRITICAL,
-                     "exiting (due to fatal error)");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_CRITICAL, "exiting (due to fatal error)");
        named_os_shutdown();
        _exit(EXIT_FAILURE);
 }
@@ -10476,12 +10441,12 @@ loadconfig(named_server_t *server) {
        isc_result_t result;
        result = load_configuration(named_g_conffile, server, false);
        if (result == ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO,
                              "reloading configuration succeeded");
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "reloading configuration failed: %s",
                              isc_result_totext(result));
                atomic_store(&server->reload_status, NAMED_RELOAD_FAILED);
@@ -10511,13 +10476,11 @@ reload(named_server_t *server) {
 
        result = load_zones(server, false);
        if (result == ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "reloading zones succeeded");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "reloading zones succeeded");
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "reloading zones failed: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "reloading zones failed: %s",
                              isc_result_totext(result));
                atomic_store(&server->reload_status, NAMED_RELOAD_FAILED);
        }
@@ -10538,9 +10501,8 @@ static void
 named_server_reload(void *arg) {
        named_server_t *server = (named_server_t *)arg;
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "received SIGHUP signal to reload zones");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "received SIGHUP signal to reload zones");
        (void)reload(server);
 }
 
@@ -10560,10 +10522,10 @@ static void
 named_server_closelogs(void *arg) {
        UNUSED(arg);
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO,
                      "received SIGUSR1 signal to close log files");
-       isc_log_closefilelogs(named_g_lctx);
+       isc_log_closefilelogs();
 }
 
 static void
@@ -10577,9 +10539,8 @@ named_server_closelogswanted(void *arg, int signum) {
 
 void
 named_server_scan_interfaces(named_server_t *server) {
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
-                     "automatic interface rescan");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_DEBUG(1), "automatic interface rescan");
 
        ns_interfacemgr_scan(server->interfacemgr, true, false);
 }
@@ -10935,13 +10896,11 @@ named_server_reconfigcommand(named_server_t *server) {
 
        result = load_zones(server, true);
        if (result == ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "scheduled loading new zones");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "scheduled loading new zones");
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "loading new zones failed: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "loading new zones failed: %s",
                              isc_result_totext(result));
                atomic_store(&server->reload_status, NAMED_RELOAD_FAILED);
        }
@@ -11063,9 +11022,9 @@ named_server_togglequerylog(named_server_t *server, isc_lex_t *lex) {
 
        ns_server_setoption(server->sctx, NS_SERVER_LOGQUERIES, value);
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "query logging is now %s", value ? "on" : "off");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "query logging is now %s",
+                     value ? "on" : "off");
        return (ISC_R_SUCCESS);
 }
 
@@ -11188,7 +11147,7 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
 
                        tlsmap = find_maplist(config, "tls", tlsname);
                        if (tlsmap == NULL) {
-                               cfg_obj_log(tlsobj, named_g_lctx, ISC_LOG_ERROR,
+                               cfg_obj_log(tlsobj, ISC_LOG_ERROR,
                                            "tls '%s' is not defined",
                                            cfg_obj_asstring(tlsobj));
                                return (ISC_R_FAILURE);
@@ -11293,7 +11252,7 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
                http_server = find_maplist(config, "http", httpname);
                if (http_server == NULL && strcasecmp(httpname, "default") != 0)
                {
-                       cfg_obj_log(httpobj, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(httpobj, ISC_LOG_ERROR,
                                    "http '%s' is not defined",
                                    cfg_obj_asstring(httpobj));
                        return (ISC_R_FAILURE);
@@ -11380,8 +11339,7 @@ listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
        }
 
        result = cfg_acl_fromconfig(cfg_tuple_get(listener, "acl"), config,
-                                   named_g_lctx, actx, mctx, family,
-                                   &delt->acl);
+                                   actx, mctx, family, &delt->acl);
        if (result != ISC_R_SUCCESS) {
                ns_listenelt_destroy(delt);
                return (result);
@@ -11496,13 +11454,11 @@ cleanup:
                (void)isc_stdio_close(fp);
        }
        if (result == ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "dumpstats complete");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "dumpstats complete");
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "dumpstats failed: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "dumpstats failed: %s",
                              isc_result_totext(result));
        }
        return (result);
@@ -11725,15 +11681,14 @@ done:
        fprintf(dctx->fp, "; Dump complete\n");
        result = isc_stdio_flush(dctx->fp);
        if (result == ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "dumpdb complete");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "dumpdb complete");
        }
 cleanup:
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "dumpdb failed: %s", isc_result_totext(result));
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "dumpdb failed: %s",
+                             isc_result_totext(result));
        }
        dumpcontext_destroy(dctx);
 }
@@ -11771,9 +11726,9 @@ named_server_dumpdb(named_server_t *server, isc_lex_t *lex,
 
        ptr = next_token(lex, NULL);
        sep = (ptr == NULL) ? "" : ": ";
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "dumpdb started%s%s", sep, (ptr != NULL) ? ptr : "");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "dumpdb started%s%s", sep,
+                     (ptr != NULL) ? ptr : "");
 
        if (ptr != NULL && strcmp(ptr, "-all") == 0) {
                /* also dump zones */
@@ -11958,13 +11913,11 @@ cleanup:
        }
 
        if (result == ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "dumpsecroots complete");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "dumpsecroots complete");
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "dumpsecroots failed: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "dumpsecroots failed: %s",
                              isc_result_totext(result));
        }
        return (result);
@@ -11997,13 +11950,11 @@ cleanup:
                result = isc_stdio_close(fp);
        }
        if (result == ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "dumprecursing complete");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "dumprecursing complete");
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "dumprecursing failed: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "dumprecursing failed: %s",
                              isc_result_totext(result));
        }
        return (result);
@@ -12036,10 +11987,10 @@ named_server_setdebuglevel(named_server_t *server, isc_lex_t *lex) {
                }
                named_g_debuglevel = (unsigned int)newlevel;
        }
-       isc_log_setdebuglevel(named_g_lctx, named_g_debuglevel);
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "debug level is now %u", named_g_debuglevel);
+       isc_log_setdebuglevel(named_g_debuglevel);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "debug level is now %u",
+                     named_g_debuglevel);
        return (ISC_R_SUCCESS);
 }
 
@@ -12192,7 +12143,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) {
                result = dns_view_flushcache(nsc->primaryview, false);
                if (result != ISC_R_SUCCESS) {
                        flushed = false;
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "flushing cache in view '%s' failed: %s",
                                      nsc->primaryview->name,
@@ -12225,7 +12176,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) {
                        if (result != ISC_R_SUCCESS) {
                                flushed = false;
                                isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                                       NAMED_LOGCATEGORY_GENERAL,
                                        NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                        "fixing cache in view '%s' "
                                        "failed: %s",
@@ -12243,19 +12194,19 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) {
 
        if (flushed && found) {
                if (ptr != NULL) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "flushing cache in view '%s' succeeded",
                                      ptr);
                } else {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "flushing caches in all views succeeded");
                }
                result = ISC_R_SUCCESS;
        } else {
                if (!found) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "flushing cache in view '%s' failed: "
                                      "view not found",
@@ -12323,7 +12274,7 @@ named_server_flushnode(named_server_t *server, isc_lex_t *lex, bool tree) {
                result = dns_view_flushnode(view, name, tree);
                if (result != ISC_R_SUCCESS) {
                        flushed = false;
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "flushing %s '%s' in cache view '%s' "
                                      "failed: %s",
@@ -12333,13 +12284,13 @@ named_server_flushnode(named_server_t *server, isc_lex_t *lex, bool tree) {
        }
        if (flushed && found) {
                if (viewname != NULL) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "flushing %s '%s' in cache view '%s' "
                                      "succeeded",
                                      tree ? "tree" : "name", target, viewname);
                } else {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "flushing %s '%s' in all cache views "
                                      "succeeded",
@@ -12348,7 +12299,7 @@ named_server_flushnode(named_server_t *server, isc_lex_t *lex, bool tree) {
                result = ISC_R_SUCCESS;
        } else {
                if (!found) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "flushing %s '%s' in cache view '%s' "
                                      "failed: view not found",
@@ -12662,9 +12613,8 @@ named_server_sync(named_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
                        }
                }
                isc_loopmgr_resume(named_g_loopmgr);
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "dumping all zones%s: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "dumping all zones%s: %s",
                              cleanup ? ", removing journal files" : "",
                              isc_result_totext(result));
                return (tresult);
@@ -12687,11 +12637,11 @@ named_server_sync(named_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
        dns_rdataclass_format(dns_zone_getclass(zone), classstr,
                              sizeof(classstr));
        dns_name_format(dns_zone_getorigin(zone), zonename, sizeof(zonename));
-       isc_log_write(
-               named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
-               ISC_LOG_INFO, "sync: dumping zone '%s/%s'%s%s%s: %s", zonename,
-               classstr, sep, vname, cleanup ? ", removing journal file" : "",
-               isc_result_totext(result));
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "sync: dumping zone '%s/%s'%s%s%s: %s",
+                     zonename, classstr, sep, vname,
+                     cleanup ? ", removing journal file" : "",
+                     isc_result_totext(result));
        dns_zone_detach(&zone);
        return (result);
 }
@@ -12731,9 +12681,8 @@ named_server_freeze(named_server_t *server, bool freeze, isc_lex_t *lex,
                        }
                }
                isc_loopmgr_resume(named_g_loopmgr);
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "%s all zones: %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "%s all zones: %s",
                              freeze ? "freezing" : "thawing",
                              isc_result_totext(tresult));
                return (tresult);
@@ -12815,9 +12764,8 @@ named_server_freeze(named_server_t *server, bool freeze, isc_lex_t *lex,
                              sizeof(classstr));
        dns_name_format(dns_zone_getorigin(mayberaw), zonename,
                        sizeof(zonename));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "%s zone '%s/%s'%s%s: %s",
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "%s zone '%s/%s'%s%s: %s",
                      freeze ? "freezing" : "thawing", zonename, classstr, sep,
                      vname, isc_result_totext(result));
        dns_zone_detach(&mayberaw);
@@ -12898,14 +12846,14 @@ cleanup:
                        result2 = isc_file_truncate(view->new_zone_file,
                                                    offset);
                        if (result2 != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                                       "Error truncating NZF file '%s' "
-                                       "during rollback from append: "
-                                       "%s",
-                                       view->new_zone_file,
-                                       isc_result_totext(result2));
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_ERROR,
+                                             "Error truncating NZF file '%s' "
+                                             "during rollback from append: "
+                                             "%s",
+                                             view->new_zone_file,
+                                             isc_result_totext(result2));
                        }
                }
        }
@@ -12985,9 +12933,8 @@ load_nzf(dns_view_t *view, ns_cfgctx_t *nzcfg) {
        result = cfg_parse_file(named_g_addparser, view->new_zone_file,
                                &cfg_type_addzoneconf, &nzcfg->nzf_config);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "Error parsing NZF file '%s': %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "Error parsing NZF file '%s': %s",
                              view->new_zone_file, isc_result_totext(result));
        }
 
@@ -13040,7 +12987,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
                /* We're deleting the zone from the database */
                status = mdb_del(*txnp, dbi, &key, NULL);
                if (status != MDB_SUCCESS && status != MDB_NOTFOUND) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "Error deleting zone %s "
                                      "from NZD database: %s",
@@ -13058,7 +13005,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
 
                zoptions = cfg_tuple_get(zconfig, "options");
                if (zoptions == NULL) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "Unable to get options from config in "
                                      "nzd_save()");
@@ -13071,7 +13018,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
                dzarg.result = ISC_R_SUCCESS;
                cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &dzarg);
                if (dzarg.result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "Error writing zone config to "
                                      "buffer in nzd_save(): %s",
@@ -13085,7 +13032,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
 
                status = mdb_put(*txnp, dbi, &key, &data, 0);
                if (status != MDB_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "Error inserting zone in "
                                      "NZD database: %s",
@@ -13105,7 +13052,7 @@ cleanup:
        } else {
                status = mdb_txn_commit(*txnp);
                if (status != MDB_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "Error committing "
                                      "NZD database: %s",
@@ -13138,17 +13085,17 @@ nzd_writable(dns_view_t *view) {
 
        status = mdb_txn_begin((MDB_env *)view->new_zone_dbenv, 0, 0, &txn);
        if (status != MDB_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                             "mdb_txn_begin: %s", mdb_strerror(status));
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING, "mdb_txn_begin: %s",
+                             mdb_strerror(status));
                return (ISC_R_FAILURE);
        }
 
        status = mdb_dbi_open(txn, NULL, 0, &dbi);
        if (status != MDB_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                             "mdb_dbi_open: %s", mdb_strerror(status));
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING, "mdb_dbi_open: %s",
+                             mdb_strerror(status));
                result = ISC_R_FAILURE;
        }
 
@@ -13172,17 +13119,17 @@ nzd_open(dns_view_t *view, unsigned int flags, MDB_txn **txnp, MDB_dbi *dbi) {
 
        status = mdb_txn_begin((MDB_env *)view->new_zone_dbenv, 0, flags, &txn);
        if (status != MDB_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                             "mdb_txn_begin: %s", mdb_strerror(status));
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING, "mdb_txn_begin: %s",
+                             mdb_strerror(status));
                goto cleanup;
        }
 
        status = mdb_dbi_open(txn, NULL, 0, dbi);
        if (status != MDB_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                             "mdb_dbi_open: %s", mdb_strerror(status));
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING, "mdb_dbi_open: %s",
+                             mdb_strerror(status));
                goto cleanup;
        }
 
@@ -13250,9 +13197,8 @@ nzd_env_reopen(dns_view_t *view) {
 
        status = mdb_env_create(&env);
        if (status != MDB_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             ISC_LOGMODULE_OTHER, ISC_LOG_ERROR,
-                             "mdb_env_create failed: %s",
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, ISC_LOGMODULE_OTHER,
+                             ISC_LOG_ERROR, "mdb_env_create failed: %s",
                              mdb_strerror(status));
                CHECK(ISC_R_FAILURE);
        }
@@ -13260,7 +13206,7 @@ nzd_env_reopen(dns_view_t *view) {
        if (view->new_zone_mapsize != 0ULL) {
                status = mdb_env_set_mapsize(env, view->new_zone_mapsize);
                if (status != MDB_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_OTHER, ISC_LOG_ERROR,
                                      "mdb_env_set_mapsize failed: %s",
                                      mdb_strerror(status));
@@ -13270,9 +13216,8 @@ nzd_env_reopen(dns_view_t *view) {
 
        status = mdb_env_open(env, view->new_zone_db, DNS_LMDB_FLAGS, 0600);
        if (status != MDB_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             ISC_LOGMODULE_OTHER, ISC_LOG_ERROR,
-                             "mdb_env_open of '%s' failed: %s",
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, ISC_LOGMODULE_OTHER,
+                             ISC_LOG_ERROR, "mdb_env_open of '%s' failed: %s",
                              view->new_zone_db, mdb_strerror(status));
                CHECK(ISC_R_FAILURE);
        }
@@ -13349,8 +13294,8 @@ load_nzf(dns_view_t *view, ns_cfgctx_t *nzcfg) {
                goto cleanup;
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO,
                      "Migrating zones from NZF file '%s' to "
                      "NZD database '%s'",
                      view->new_zone_file, view->new_zone_db);
@@ -13364,9 +13309,8 @@ load_nzf(dns_view_t *view, ns_cfgctx_t *nzcfg) {
        result = cfg_parse_file(named_g_addparser, view->new_zone_file,
                                &cfg_type_addzoneconf, &nzf_config);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "Error parsing NZF file '%s': %s",
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "Error parsing NZF file '%s': %s",
                              view->new_zone_file, isc_result_totext(result));
                goto cleanup;
        }
@@ -13423,7 +13367,7 @@ load_nzf(dns_view_t *view, ns_cfgctx_t *nzcfg) {
                dzarg.result = ISC_R_SUCCESS;
                cfg_printx(zoptions, CFG_PRINTER_ONELINE, dumpzone, &dzarg);
                if (dzarg.result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "Error writing zone config to "
                                      "buffer in load_nzf(): %s",
@@ -13437,7 +13381,7 @@ load_nzf(dns_view_t *view, ns_cfgctx_t *nzcfg) {
 
                status = mdb_put(txn, dbi, &key, &data, MDB_NOOVERWRITE);
                if (status != MDB_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "Error inserting zone in "
                                      "NZD database: %s",
@@ -13751,7 +13695,7 @@ do_addzone(named_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
        } else {
                result = dns_view_findzone(view, name, DNS_ZTFIND_EXACT, &zone);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "added new zone was not found: %s",
                                      isc_result_totext(result));
@@ -13786,9 +13730,8 @@ do_addzone(named_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
                TCHECK(putstr(text, "dns_zone_loadnew failed: "));
                TCHECK(putstr(text, isc_result_totext(result)));
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "addzone failed; reverting.");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "addzone failed; reverting.");
 
                /* If the zone loaded partially, unload it */
                if (dns_zone_getdb(zone, &dbp) == ISC_R_SUCCESS) {
@@ -13995,9 +13938,8 @@ do_modzone(named_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
                TCHECK(putstr(text, "Use 'rndc addzone' to correct\n"));
                TCHECK(putstr(text, "the problem and restore service."));
 
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                             "modzone failed; removing zone.");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO, "modzone failed; removing zone.");
 
                /* If the zone loaded partially, unload it */
                if (dns_zone_getdb(zone, &dbp) == ISC_R_SUCCESS) {
@@ -14134,9 +14076,8 @@ named_server_changezone(named_server_t *server, char *command,
                                 redirect, text));
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "%s zone %s in view %s via %s",
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "%s zone %s in view %s via %s",
                      addzone ? "added" : "updated", zonename, view->name,
                      addzone ? NAMED_COMMAND_ADDZONE : NAMED_COMMAND_MODZONE);
 
@@ -14205,10 +14146,9 @@ rmzone(void *arg) {
        cfg = (ns_cfgctx_t *)view->new_zone_config;
        dns_name_format(dns_zone_getorigin(zone), zonename, sizeof(zonename));
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "deleting zone %s in view %s via delzone", zonename,
-                     view->name);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "deleting zone %s in view %s via delzone",
+                     zonename, view->name);
 
        /*
         * Remove the zone from configuration (and NZF file if applicable)
@@ -14223,7 +14163,7 @@ rmzone(void *arg) {
                LOCK(&view->new_zone_lock);
                result = nzd_open(view, 0, &txn, &dbi);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "unable to open NZD database for '%s'",
                                      view->new_zone_db);
@@ -14232,7 +14172,7 @@ rmzone(void *arg) {
                }
 
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "unable to delete zone configuration: %s",
                                      isc_result_totext(result));
@@ -14247,7 +14187,7 @@ rmzone(void *arg) {
                                         dns_zone_getorigin(zone),
                                         nzf_writeconf);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "unable to delete zone configuration: %s",
                                      isc_result_totext(result));
@@ -14268,7 +14208,7 @@ rmzone(void *arg) {
                                dns_zone_getorigin(zone), NULL);
                }
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "unable to delete zone configuration: %s",
                                      isc_result_totext(result));
@@ -14291,7 +14231,7 @@ rmzone(void *arg) {
                file = dns_zone_getfile(mayberaw);
                result = isc_file_remove(file);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "file %s not removed: %s", file,
                                      isc_result_totext(result));
@@ -14300,7 +14240,7 @@ rmzone(void *arg) {
                file = dns_zone_getjournal(mayberaw);
                result = isc_file_remove(file);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "file %s not removed: %s", file,
                                      isc_result_totext(result));
@@ -14310,21 +14250,21 @@ rmzone(void *arg) {
                        file = dns_zone_getfile(zone);
                        result = isc_file_remove(file);
                        if (result != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                                       "file %s not removed: %s", file,
-                                       isc_result_totext(result));
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_WARNING,
+                                             "file %s not removed: %s", file,
+                                             isc_result_totext(result));
                        }
 
                        file = dns_zone_getjournal(zone);
                        result = isc_file_remove(file);
                        if (result != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                                       "file %s not removed: %s", file,
-                                       isc_result_totext(result));
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_WARNING,
+                                             "file %s not removed: %s", file,
+                                             isc_result_totext(result));
                        }
                }
        }
@@ -14448,9 +14388,9 @@ named_server_delzone(named_server_t *server, isc_lex_t *lex,
                }
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                     "zone %s scheduled for removal via delzone", zonename);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_INFO, "zone %s scheduled for removal via delzone",
+                     zonename);
 
        /* Removing a zone counts as reconfiguration */
        named_g_configtime = isc_time_now();
@@ -15654,7 +15594,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, bool readonly,
        }
 
        if (readonly) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                              NAMED_LOGMODULE_CONTROL, ISC_LOG_INFO,
                              "rejecting restricted control channel "
                              "NTA command");
@@ -15727,8 +15667,8 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, bool readonly,
                }
 
                result = dns_view_flushnode(view, ntaname, true);
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_INFO,
                              "flush tree '%s' in cache view '%s': %s", namebuf,
                              view->name, isc_result_totext(result));
 
@@ -15752,7 +15692,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, bool readonly,
                        CHECK(putstr(text, ", expires "));
                        CHECK(putstr(text, tbuf));
 
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
                                      "added NTA '%s' (%d sec) in view '%s'",
                                      namebuf, ntattl, view->name);
@@ -15781,17 +15721,17 @@ named_server_nta(named_server_t *server, isc_lex_t *lex, bool readonly,
                        CHECK(putstr(text, view->name));
 
                        if (wasremoved) {
-                               isc_log_write(
-                                       named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                                       NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
-                                       "removed NTA '%s' in view %s", namebuf,
-                                       view->name);
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
+                                             NAMED_LOGMODULE_SERVER,
+                                             ISC_LOG_INFO,
+                                             "removed NTA '%s' in view %s",
+                                             namebuf, view->name);
                        }
                }
 
                result = dns_view_saventa(view);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "error writing NTA file "
                                      "for view '%s': %s",
@@ -15832,7 +15772,7 @@ named_server_saventa(named_server_t *server) {
                isc_result_t result = dns_view_saventa(view);
 
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "error writing NTA file "
                                      "for view '%s': %s",
@@ -15856,7 +15796,7 @@ named_server_loadnta(named_server_t *server) {
                    (result != ISC_R_FILENOTFOUND) &&
                    (result != ISC_R_NOTFOUND))
                {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "error loading NTA file "
                                      "for view '%s': %s",
@@ -15917,9 +15857,8 @@ mkey_destroy(dns_view_t *view, isc_buffer_t **text) {
        if (result == ISC_R_SUCCESS) {
                removed_a_file = true;
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                             "file %s not removed: %s", file,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING, "file %s not removed: %s", file,
                              isc_result_totext(result));
        }
 
@@ -15928,9 +15867,8 @@ mkey_destroy(dns_view_t *view, isc_buffer_t **text) {
        if (result == ISC_R_SUCCESS) {
                removed_a_file = true;
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                             "file %s not removed: %s", file,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING, "file %s not removed: %s", file,
                              isc_result_totext(result));
        }
 
index b9b85e0594fc6c07959f81813c3ca706e0694c30..b29b26f16a2cc8d85e76ea51ada3a71b4378bc1f 100644 (file)
@@ -936,9 +936,8 @@ dump_counters(isc_statsformat_t type, void *arg, const char *category,
        return (ISC_R_SUCCESS);
 #ifdef HAVE_LIBXML2
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "failed at dump_counters()");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "failed at dump_counters()");
        return (ISC_R_FAILURE);
 #endif /* ifdef HAVE_LIBXML2 */
 }
@@ -999,9 +998,8 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
        return;
 #ifdef HAVE_LIBXML2
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "failed at rdtypestat_dump()");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "failed at rdtypestat_dump()");
        dumparg->result = ISC_R_FAILURE;
        return;
 #endif /* ifdef HAVE_LIBXML2 */
@@ -1088,9 +1086,8 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
        return;
 #ifdef HAVE_LIBXML2
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "failed at rdatasetstats_dump()");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "failed at rdatasetstats_dump()");
        dumparg->result = ISC_R_FAILURE;
 #endif /* ifdef HAVE_LIBXML2 */
 }
@@ -1143,9 +1140,8 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
 
 #ifdef HAVE_LIBXML2
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "failed at opcodestat_dump()");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "failed at opcodestat_dump()");
        dumparg->result = ISC_R_FAILURE;
        return;
 #endif /* ifdef HAVE_LIBXML2 */
@@ -1199,9 +1195,8 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
 
 #ifdef HAVE_LIBXML2
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "failed at rcodestat_dump()");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "failed at rcodestat_dump()");
        dumparg->result = ISC_R_FAILURE;
        return;
 #endif /* ifdef HAVE_LIBXML2 */
@@ -1256,9 +1251,8 @@ dnssecsignstat_dump(uint32_t kval, uint64_t val, void *arg) {
        return;
 #ifdef HAVE_LIBXML2
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "failed at dnssecsignstat_dump()");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "failed at dnssecsignstat_dump()");
        dumparg->result = ISC_R_FAILURE;
        return;
 #endif /* ifdef HAVE_LIBXML2 */
@@ -1452,9 +1446,8 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
 
        return (ISC_R_SUCCESS);
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "Failed at zone_xmlrender()");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "Failed at zone_xmlrender()");
        return (ISC_R_FAILURE);
 }
 
@@ -1725,9 +1718,8 @@ cleanup:
                dns_xfrin_detach(&xfr);
        }
 
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "Failed at xfrin_xmlrender()");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "Failed at xfrin_xmlrender()");
 
        return (ISC_R_FAILURE);
 }
@@ -2134,9 +2126,8 @@ generatexml(named_server_t *server, uint32_t flags, int *buflen,
        return (ISC_R_SUCCESS);
 
 cleanup:
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                     "failed generating XML response");
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_ERROR, "failed generating XML response");
        if (writer != NULL) {
                xmlFreeTextWriter(writer);
        }
@@ -2173,9 +2164,8 @@ render_xml(uint32_t flags, void *arg, unsigned int *retcode,
                *freecb = wrap_xmlfree;
                *freecb_args = NULL;
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "failed at rendering XML()");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "failed at rendering XML()");
        }
 
        return (result);
@@ -3376,9 +3366,8 @@ render_json(uint32_t flags, void *arg, unsigned int *retcode,
                *freecb = wrap_jsonfree;
                *freecb_args = bindstats;
        } else {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "failed at rendering JSON()");
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "failed at rendering JSON()");
        }
 
        return (result);
@@ -3534,9 +3523,9 @@ static void
 shutdown_listener(named_statschannel_t *listener) {
        char socktext[ISC_SOCKADDR_FORMATSIZE];
        isc_sockaddr_format(&listener->address, socktext, sizeof(socktext));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
-                     "stopping statistics channel on %s", socktext);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_NOTICE, "stopping statistics channel on %s",
+                     socktext);
 
        isc_httpdmgr_shutdown(&listener->httpdmgr);
 }
@@ -3565,9 +3554,9 @@ client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
        UNLOCK(&listener->lock);
 
        isc_sockaddr_format(fromaddr, socktext, sizeof(socktext));
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
-                     "rejected statistics connection from %s", socktext);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_WARNING, "rejected statistics connection from %s",
+                     socktext);
 
        return (false);
 }
@@ -3605,9 +3594,8 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
 
        allow = cfg_tuple_get(listen_params, "allow");
        if (allow != NULL && cfg_obj_islist(allow)) {
-               result = cfg_acl_fromconfig(allow, config, named_g_lctx,
-                                           aclconfctx, listener->mctx, 0,
-                                           &new_acl);
+               result = cfg_acl_fromconfig(allow, config, aclconfctx,
+                                           listener->mctx, 0, &new_acl);
        } else {
                result = dns_acl_any(listener->mctx, &new_acl);
        }
@@ -3689,9 +3677,9 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
                            server);
 
        *listenerp = listener;
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
-                     "statistics channel listening on %s", socktext);
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                     ISC_LOG_NOTICE, "statistics channel listening on %s",
+                     socktext);
 
        return (ISC_R_SUCCESS);
 
@@ -3733,9 +3721,8 @@ update_listener(named_server_t *server, named_statschannel_t **listenerp,
         */
        allow = cfg_tuple_get(listen_params, "allow");
        if (allow != NULL && cfg_obj_islist(allow)) {
-               result = cfg_acl_fromconfig(allow, config, named_g_lctx,
-                                           aclconfctx, listener->mctx, 0,
-                                           &new_acl);
+               result = cfg_acl_fromconfig(allow, config, aclconfctx,
+                                           listener->mctx, 0, &new_acl);
        } else {
                result = dns_acl_any(listener->mctx, &new_acl);
        }
@@ -3749,7 +3736,7 @@ update_listener(named_server_t *server, named_statschannel_t **listenerp,
 
                UNLOCK(&listener->lock);
        } else {
-               cfg_obj_log(listen_params, named_g_lctx, ISC_LOG_WARNING,
+               cfg_obj_log(listen_params, ISC_LOG_WARNING,
                            "couldn't install new acl for "
                            "statistics channel %s: %s",
                            socktext, isc_result_totext(result));
@@ -3786,20 +3773,20 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
         */
        if (statschannellist != NULL) {
 #ifndef EXTENDED_STATS
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING,
                              "statistics-channels specified but not effective "
                              "due to missing XML and/or JSON library");
 #else /* EXTENDED_STATS */
 #ifndef HAVE_LIBXML2
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING,
                              "statistics-channels: XML library missing, "
                              "only JSON stats will be available");
 #endif /* !HAVE_LIBXML2 */
 #ifndef HAVE_JSON_C
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_WARNING,
                              "statistics-channels: JSON library missing, "
                              "only XML stats will be available");
 #endif /* !HAVE_JSON_C */
@@ -3838,8 +3825,7 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
                                isc_sockaddr_format(&addr, socktext,
                                                    sizeof(socktext));
 
-                               isc_log_write(named_g_lctx,
-                                             NAMED_LOGCATEGORY_GENERAL,
+                               isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                              NAMED_LOGMODULE_SERVER,
                                              ISC_LOG_DEBUG(9),
                                              "processing statistics "
@@ -3870,7 +3856,6 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
                                        if (r != ISC_R_SUCCESS) {
                                                cfg_obj_log(
                                                        listen_params,
-                                                       named_g_lctx,
                                                        ISC_LOG_WARNING,
                                                        "couldn't allocate "
                                                        "statistics channel"
index 24acdcd0c232d3d86fb7e14b0a1f81c6525edd99..b650f37478c968b6511d64fb73c82d0d3f4e8047 100644 (file)
@@ -38,9 +38,9 @@
        } while (0)
 
 #include <named/log.h>
-#define LOG(msg)                                               \
-       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, \
-                     NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR, "%s", msg)
+#define LOG(msg)                                                         \
+       isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER, \
+                     ISC_LOG_ERROR, "%s", msg)
 
 isc_result_t
 named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
index d1736d07266a71cabc36d9a1495da42d2afe59ce..da68b0e92430329640701f612b1fdf2809bea8a7 100644 (file)
@@ -133,8 +133,7 @@ add_doh_transports(const cfg_obj_t *transportlist, dns_transport_list_t *list) {
 
        return (ISC_R_SUCCESS);
 failure:
-       cfg_obj_log(doh, named_g_lctx, ISC_LOG_ERROR,
-                   "configuring DoH '%s': %s", dohid,
+       cfg_obj_log(doh, ISC_LOG_ERROR, "configuring DoH '%s': %s", dohid,
                    isc_result_totext(result));
 
        return (result);
@@ -187,8 +186,7 @@ add_tls_transports(const cfg_obj_t *transportlist, dns_transport_list_t *list) {
 
        return (ISC_R_SUCCESS);
 failure:
-       cfg_obj_log(tls, named_g_lctx, ISC_LOG_ERROR,
-                   "configuring tls '%s': %s", tlsid,
+       cfg_obj_log(tls, ISC_LOG_ERROR, "configuring tls '%s': %s", tlsid,
                    isc_result_totext(result));
 
        return (result);
index dfeadfd99f41a6a648dbdd1f4c76987b2788f37e..fda2701bc4dc203f72c6a98335ab83c72591b67a 100644 (file)
@@ -85,7 +85,7 @@ add_initial_keys(const cfg_obj_t *list, dns_tsigkeyring_t *ring,
                if (named_config_getkeyalgorithm(algstr, &alg, &bits) !=
                    ISC_R_SUCCESS)
                {
-                       cfg_obj_log(algobj, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(algobj, ISC_LOG_ERROR,
                                    "key '%s': has a "
                                    "unsupported algorithm '%s'",
                                    keyid, algstr);
@@ -129,8 +129,8 @@ failure:
        if (secret != NULL) {
                isc_mem_put(mctx, secret, secretalloc);
        }
-       cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
-                   "configuring key '%s': %s", keyid, isc_result_totext(ret));
+       cfg_obj_log(key, ISC_LOG_ERROR, "configuring key '%s': %s", keyid,
+                   isc_result_totext(ret));
        return (ret);
 }
 
index d9b0b90eb3895891cf336c7a9b9a8c4c6c896126..70d6f464d495f5d359fa432915d77c071a23321d 100644 (file)
@@ -175,8 +175,8 @@ configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
        }
 
 parse_acl:
-       result = cfg_acl_fromconfig(aclobj, config, named_g_lctx, actx,
-                                   named_g_mctx, 0, &acl);
+       result = cfg_acl_fromconfig(aclobj, config, actx, named_g_mctx, 0,
+                                   &acl);
        if (result != ISC_R_SUCCESS) {
                return (result);
        }
@@ -262,7 +262,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
                result = dns_name_fromtext(dns_fixedname_name(&fident), &b,
                                           dns_rootname, 0, NULL);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(identity, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(identity, ISC_LOG_ERROR,
                                    "'%s' is not a valid name", str);
                        goto cleanup;
                }
@@ -278,8 +278,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
                        result = dns_name_fromtext(dns_fixedname_name(&fname),
                                                   &b, dns_rootname, 0, NULL);
                        if (result != ISC_R_SUCCESS) {
-                               cfg_obj_log(identity, named_g_lctx,
-                                           ISC_LOG_ERROR,
+                               cfg_obj_log(identity, ISC_LOG_ERROR,
                                            "'%s' is not a valid name", str);
                                goto cleanup;
                        }
@@ -315,8 +314,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
                                if (max > 0xffff || end[0] != /*(*/ ')' ||
                                    end[1] != 0)
                                {
-                                       cfg_obj_log(identity, named_g_lctx,
-                                                   ISC_LOG_ERROR,
+                                       cfg_obj_log(identity, ISC_LOG_ERROR,
                                                    "'%s' is not a valid count",
                                                    bracket);
                                        isc_mem_cput(mctx, types, n,
@@ -330,8 +328,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
 
                        result = dns_rdatatype_fromtext(&types[i++].type, &r);
                        if (result != ISC_R_SUCCESS) {
-                               cfg_obj_log(identity, named_g_lctx,
-                                           ISC_LOG_ERROR,
+                               cfg_obj_log(identity, ISC_LOG_ERROR,
                                            "'%.*s' is not a valid type",
                                            (int)r.length, str);
                                isc_mem_cput(mctx, types, n, sizeof(*types));
@@ -357,7 +354,7 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
                dns_ssuruletype_t any = { dns_rdatatype_any, 0 };
 
                if (named_g_server->session_keyname == NULL) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "failed to enable auto DDNS policy "
                                      "for zone %s: session key not found",
@@ -415,14 +412,14 @@ configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone,
 
                sa = cfg_obj_assockaddr(address);
                if (isc_sockaddr_getport(sa) != 0) {
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "port is not configurable for "
                                    "static stub server-addresses");
                        return (ISC_R_FAILURE);
                }
                isc_netaddr_fromsockaddr(&na, sa);
                if (isc_netaddr_getzone(&na) != 0) {
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "scoped address is not allowed "
                                    "for static stub "
                                    "server-addresses");
@@ -508,14 +505,14 @@ configure_staticstub_servernames(const cfg_obj_t *zconfig, dns_zone_t *zone,
                isc_buffer_add(&b, strlen(str));
                result = dns_name_fromtext(nsname, &b, dns_rootname, 0, NULL);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "server-name '%s' is not a valid "
                                    "name",
                                    str);
                        return (result);
                }
                if (dns_name_issubdomain(nsname, dns_zone_getorigin(zone))) {
-                       cfg_obj_log(zconfig, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "server-name '%s' must not be a "
                                    "subdomain of zone name '%s'",
                                    str, zname);
@@ -602,8 +599,8 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
         * to trigger delegation.
         */
        if (ISC_LIST_EMPTY(rdatalist_ns.rdata)) {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR,
                              "No NS record is configured for a "
                              "static-stub zone '%s'",
                              zname);
@@ -854,7 +851,7 @@ process_notifytype(dns_notifytype_t ntype, dns_zonetype_t ztype,
         * hierarchy supplied in 'maps'.
         */
        if (named_config_get(maps, "notify", &obj) == ISC_R_SUCCESS) {
-               cfg_obj_log(obj, named_g_lctx, ISC_LOG_INFO,
+               cfg_obj_log(obj, ISC_LOG_INFO,
                            "'notify explicit;' will be used for mirror zone "
                            "'%s'",
                            zname);
@@ -975,7 +972,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                size_t len;
 
                if (cpval != default_dbtype) {
-                       isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+                       isc_log_write(NAMED_LOGCATEGORY_GENERAL,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
                                      "zone '%s': both 'database' and 'dlz' "
                                      "specified",
@@ -1018,9 +1015,9 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
        if (ztype == dns_zone_primary && cpval == default_dbtype &&
            filename == NULL)
        {
-               isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
-                             NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
-                             "zone '%s': 'file' not specified", zname);
+               isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
+                             ISC_LOG_ERROR, "zone '%s': 'file' not specified",
+                             zname);
                CHECK(ISC_R_FAILURE);
        }
 
@@ -1049,7 +1046,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                const char *masterstylestr = cfg_obj_asstring(obj);
 
                if (masterformat != dns_masterformat_text) {
-                       cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "zone '%s': 'masterfile-style' "
                                    "can only be used with "
                                    "'masterfile-format text'",
@@ -1233,8 +1230,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                                                           &kasp);
                                if (result != ISC_R_SUCCESS) {
                                        cfg_obj_log(
-                                               obj, named_g_lctx,
-                                               ISC_LOG_ERROR,
+                                               obj, ISC_LOG_ERROR,
                                                "dnssec-policy '%s' not found ",
                                                kaspname);
                                        CHECK(result);
@@ -1360,7 +1356,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                } else {
                        uint64_t value = cfg_obj_asuint64(obj);
                        if (value > DNS_JOURNAL_SIZE_MAX) {
-                               cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "'max-journal-size "
                                            "%" PRId64 "' "
                                            "is too large",
@@ -1505,7 +1501,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                } else {
                        uint64_t value = cfg_obj_asuint64(obj);
                        if (value > DNS_JOURNAL_SIZE_MAX) {
-                               cfg_obj_log(obj, named_g_lctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "'max-journal-size "
                                            "%" PRId64 "' "
                                            "is too large",
@@ -1546,7 +1542,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
 
                updateacl = dns_zone_getupdateacl(mayberaw);
                if (updateacl != NULL && dns_acl_isinsecure(updateacl)) {
-                       isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
+                       isc_log_write(DNS_LOGCATEGORY_SECURITY,
                                      NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
                                      "zone '%s' allows unsigned updates "
                                      "from remote hosts, which is insecure",
index ac2b62f7f7894f40f302a9d933561d9a52e92a6c..61062c173066a32c808a3111c3400346a4438722 100644 (file)
@@ -123,7 +123,6 @@ static bool usegsstsig = false;
 static bool local_only = false;
 static isc_nm_t *netmgr = NULL;
 static isc_loopmgr_t *loopmgr = NULL;
-static isc_log_t *glctx = NULL;
 static isc_mem_t *gmctx = NULL;
 static dns_dispatchmgr_t *dispatchmgr = NULL;
 static dns_requestmgr_t *requestmgr = NULL;
@@ -559,7 +558,7 @@ failure:
  * Get a key from a named.conf format keyfile
  */
 static isc_result_t
-read_sessionkey(isc_mem_t *mctx, isc_log_t *lctx) {
+read_sessionkey(isc_mem_t *mctx) {
        cfg_parser_t *pctx = NULL;
        cfg_obj_t *sessionkey = NULL;
        const cfg_obj_t *key = NULL;
@@ -575,7 +574,7 @@ read_sessionkey(isc_mem_t *mctx, isc_log_t *lctx) {
                return (ISC_R_FILENOTFOUND);
        }
 
-       result = cfg_parser_create(mctx, lctx, &pctx);
+       result = cfg_parser_create(mctx, &pctx);
        if (result != ISC_R_SUCCESS) {
                goto cleanup;
        }
@@ -622,7 +621,7 @@ cleanup:
 }
 
 static void
-setup_keyfile(isc_mem_t *mctx, isc_log_t *lctx) {
+setup_keyfile(isc_mem_t *mctx) {
        dst_key_t *dstkey = NULL;
        isc_result_t result;
        dst_algorithm_t hmac_alg = DST_ALG_UNKNOWN;
@@ -639,7 +638,7 @@ setup_keyfile(isc_mem_t *mctx, isc_log_t *lctx) {
 
        /* If that didn't work, try reading it as a session.key keyfile */
        if (result != ISC_R_SUCCESS) {
-               result = read_sessionkey(mctx, lctx);
+               result = read_sessionkey(mctx);
                if (result == ISC_R_SUCCESS) {
                        return;
                }
@@ -812,13 +811,13 @@ setup_system(void *arg ISC_ATTR_UNUSED) {
 
        ddebug("setup_system()");
 
-       dns_log_init(glctx);
+       dns_log_init();
 
-       logconfig = isc_logconfig_get(glctx);
+       logconfig = isc_logconfig_get();
        result = isc_log_usechannel(logconfig, "default_debug", NULL, NULL);
        check_result(result, "isc_log_usechannel");
 
-       isc_log_setdebuglevel(glctx, logdebuglevel);
+       isc_log_setdebuglevel(logdebuglevel);
 
        result = irs_resconf_load(gmctx, resolvconf, &resconf);
        if (result != ISC_R_SUCCESS && result != ISC_R_FILENOTFOUND) {
@@ -971,13 +970,13 @@ setup_system(void *arg ISC_ATTR_UNUSED) {
        if (keystr != NULL) {
                setup_keystr();
        } else if (local_only) {
-               result = read_sessionkey(gmctx, glctx);
+               result = read_sessionkey(gmctx);
                if (result != ISC_R_SUCCESS) {
                        fatal("can't read key from %s: %s\n", keyfile,
                              isc_result_totext(result));
                }
        } else if (keyfile != NULL) {
-               setup_keyfile(gmctx, glctx);
+               setup_keyfile(gmctx);
        }
 
        isc_mutex_init(&answer_lock);
index 9ee1e9f374a20bfafb5bfc0eb98380fe64230225..b710149e97d05a46480d85ab718d6b01668eb774 100644 (file)
@@ -231,8 +231,7 @@ parse_filter_a_on(const cfg_obj_t *param_obj, const char *param_name,
 }
 
 static isc_result_t
-check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, isc_log_t *lctx,
-            void *actx) {
+check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, void *actx) {
        isc_result_t result = ISC_R_SUCCESS;
        const cfg_obj_t *aclobj = NULL;
        dns_acl_t *acl = NULL;
@@ -243,20 +242,20 @@ check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, isc_log_t *lctx,
                return (result);
        }
 
-       CHECK(cfg_acl_fromconfig(aclobj, (const cfg_obj_t *)cfg, lctx,
+       CHECK(cfg_acl_fromconfig(aclobj, (const cfg_obj_t *)cfg,
                                 (cfg_aclconfctx_t *)actx, mctx, 0, &acl));
 
        CHECK(parse_filter_a_on(fmap, "filter-a-on-v6", &f6));
        CHECK(parse_filter_a_on(fmap, "filter-a-on-v4", &f4));
 
        if ((f4 != NONE || f6 != NONE) && dns_acl_isnone(acl)) {
-               cfg_obj_log(aclobj, lctx, ISC_LOG_WARNING,
+               cfg_obj_log(aclobj, ISC_LOG_WARNING,
                            "\"filter-a\" is 'none;' but "
                            "either filter-a-on-v6 or filter-a-on-v4 "
                            "is enabled");
                result = ISC_R_FAILURE;
        } else if (f4 == NONE && f6 == NONE && !dns_acl_isnone(acl)) {
-               cfg_obj_log(aclobj, lctx, ISC_LOG_WARNING,
+               cfg_obj_log(aclobj, ISC_LOG_WARNING,
                            "\"filter-a\" is set but "
                            "neither filter-a-on-v6 or filter-a-on-v4 "
                            "is enabled");
@@ -274,28 +273,28 @@ cleanup:
 static isc_result_t
 parse_parameters(filter_instance_t *inst, const char *parameters,
                 const void *cfg, const char *cfg_file, unsigned long cfg_line,
-                isc_mem_t *mctx, isc_log_t *lctx, void *actx) {
+                isc_mem_t *mctx, void *actx) {
        isc_result_t result = ISC_R_SUCCESS;
        cfg_parser_t *parser = NULL;
        cfg_obj_t *param_obj = NULL;
        const cfg_obj_t *obj = NULL;
        isc_buffer_t b;
 
-       CHECK(cfg_parser_create(mctx, lctx, &parser));
+       CHECK(cfg_parser_create(mctx, &parser));
 
        isc_buffer_constinit(&b, parameters, strlen(parameters));
        isc_buffer_add(&b, strlen(parameters));
        CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line,
                               &cfg_type_parameters, 0, &param_obj));
 
-       CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx));
+       CHECK(check_syntax(param_obj, cfg, mctx, actx));
 
        CHECK(parse_filter_a_on(param_obj, "filter-a-on-v6", &inst->v6_a));
        CHECK(parse_filter_a_on(param_obj, "filter-a-on-v4", &inst->v4_a));
 
        result = cfg_map_get(param_obj, "filter-a", &obj);
        if (result == ISC_R_SUCCESS) {
-               CHECK(cfg_acl_fromconfig(obj, (const cfg_obj_t *)cfg, lctx,
+               CHECK(cfg_acl_fromconfig(obj, (const cfg_obj_t *)cfg,
                                         (cfg_aclconfctx_t *)actx, mctx, 0,
                                         &inst->a_acl));
        } else {
@@ -327,13 +326,12 @@ cleanup:
  */
 isc_result_t
 plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
-               unsigned long cfg_line, isc_mem_t *mctx, isc_log_t *lctx,
-               void *actx, ns_hooktable_t *hooktable, void **instp) {
+               unsigned long cfg_line, isc_mem_t *mctx, void *actx,
+               ns_hooktable_t *hooktable, void **instp) {
        filter_instance_t *inst = NULL;
        isc_result_t result = ISC_R_SUCCESS;
 
-       isc_log_write(lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
-                     ISC_LOG_INFO,
+       isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
                      "registering 'filter-a' "
                      "module from %s:%lu, %s parameters",
                      cfg_file, cfg_line, parameters != NULL ? "with" : "no");
@@ -344,7 +342,7 @@ plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
 
        if (parameters != NULL) {
                CHECK(parse_parameters(inst, parameters, cfg, cfg_file,
-                                      cfg_line, mctx, lctx, actx));
+                                      cfg_line, mctx, actx));
        }
 
        isc_ht_init(&inst->ht, mctx, 1, ISC_HT_CASE_SENSITIVE);
@@ -367,21 +365,20 @@ cleanup:
 
 isc_result_t
 plugin_check(const char *parameters, const void *cfg, const char *cfg_file,
-            unsigned long cfg_line, isc_mem_t *mctx, isc_log_t *lctx,
-            void *actx) {
+            unsigned long cfg_line, isc_mem_t *mctx, void *actx) {
        isc_result_t result = ISC_R_SUCCESS;
        cfg_parser_t *parser = NULL;
        cfg_obj_t *param_obj = NULL;
        isc_buffer_t b;
 
-       CHECK(cfg_parser_create(mctx, lctx, &parser));
+       CHECK(cfg_parser_create(mctx, &parser));
 
        isc_buffer_constinit(&b, parameters, strlen(parameters));
        isc_buffer_add(&b, strlen(parameters));
        CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line,
                               &cfg_type_parameters, 0, &param_obj));
 
-       CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx));
+       CHECK(check_syntax(param_obj, cfg, mctx, actx));
 
 cleanup:
        if (param_obj != NULL) {
index 9830639938003d10908a1c732a163840bf074814..f39ac91e47e0ab229d1f9dac84a492cb914226c6 100644 (file)
@@ -232,8 +232,7 @@ parse_filter_aaaa_on(const cfg_obj_t *param_obj, const char *param_name,
 }
 
 static isc_result_t
-check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, isc_log_t *lctx,
-            void *actx) {
+check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, void *actx) {
        isc_result_t result = ISC_R_SUCCESS;
        const cfg_obj_t *aclobj = NULL;
        dns_acl_t *acl = NULL;
@@ -244,20 +243,20 @@ check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, isc_log_t *lctx,
                return (result);
        }
 
-       CHECK(cfg_acl_fromconfig(aclobj, (const cfg_obj_t *)cfg, lctx,
+       CHECK(cfg_acl_fromconfig(aclobj, (const cfg_obj_t *)cfg,
                                 (cfg_aclconfctx_t *)actx, mctx, 0, &acl));
 
        CHECK(parse_filter_aaaa_on(fmap, "filter-aaaa-on-v4", &f4));
        CHECK(parse_filter_aaaa_on(fmap, "filter-aaaa-on-v6", &f6));
 
        if ((f4 != NONE || f6 != NONE) && dns_acl_isnone(acl)) {
-               cfg_obj_log(aclobj, lctx, ISC_LOG_WARNING,
+               cfg_obj_log(aclobj, ISC_LOG_WARNING,
                            "\"filter-aaaa\" is 'none;' but "
                            "either filter-aaaa-on-v4 or filter-aaaa-on-v6 "
                            "is enabled");
                result = ISC_R_FAILURE;
        } else if (f4 == NONE && f6 == NONE && !dns_acl_isnone(acl)) {
-               cfg_obj_log(aclobj, lctx, ISC_LOG_WARNING,
+               cfg_obj_log(aclobj, ISC_LOG_WARNING,
                            "\"filter-aaaa\" is set but "
                            "neither filter-aaaa-on-v4 or filter-aaaa-on-v6 "
                            "is enabled");
@@ -275,21 +274,21 @@ cleanup:
 static isc_result_t
 parse_parameters(filter_instance_t *inst, const char *parameters,
                 const void *cfg, const char *cfg_file, unsigned long cfg_line,
-                isc_mem_t *mctx, isc_log_t *lctx, void *actx) {
+                isc_mem_t *mctx, void *actx) {
        isc_result_t result = ISC_R_SUCCESS;
        cfg_parser_t *parser = NULL;
        cfg_obj_t *param_obj = NULL;
        const cfg_obj_t *obj = NULL;
        isc_buffer_t b;
 
-       CHECK(cfg_parser_create(mctx, lctx, &parser));
+       CHECK(cfg_parser_create(mctx, &parser));
 
        isc_buffer_constinit(&b, parameters, strlen(parameters));
        isc_buffer_add(&b, strlen(parameters));
        CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line,
                               &cfg_type_parameters, 0, &param_obj));
 
-       CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx));
+       CHECK(check_syntax(param_obj, cfg, mctx, actx));
 
        CHECK(parse_filter_aaaa_on(param_obj, "filter-aaaa-on-v4",
                                   &inst->v4_aaaa));
@@ -298,7 +297,7 @@ parse_parameters(filter_instance_t *inst, const char *parameters,
 
        result = cfg_map_get(param_obj, "filter-aaaa", &obj);
        if (result == ISC_R_SUCCESS) {
-               CHECK(cfg_acl_fromconfig(obj, (const cfg_obj_t *)cfg, lctx,
+               CHECK(cfg_acl_fromconfig(obj, (const cfg_obj_t *)cfg,
                                         (cfg_aclconfctx_t *)actx, mctx, 0,
                                         &inst->aaaa_acl));
        } else {
@@ -330,13 +329,12 @@ cleanup:
  */
 isc_result_t
 plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
-               unsigned long cfg_line, isc_mem_t *mctx, isc_log_t *lctx,
-               void *actx, ns_hooktable_t *hooktable, void **instp) {
+               unsigned long cfg_line, isc_mem_t *mctx, void *actx,
+               ns_hooktable_t *hooktable, void **instp) {
        filter_instance_t *inst = NULL;
        isc_result_t result = ISC_R_SUCCESS;
 
-       isc_log_write(lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
-                     ISC_LOG_INFO,
+       isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
                      "registering 'filter-aaaa' "
                      "module from %s:%lu, %s parameters",
                      cfg_file, cfg_line, parameters != NULL ? "with" : "no");
@@ -348,7 +346,7 @@ plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
 
        if (parameters != NULL) {
                CHECK(parse_parameters(inst, parameters, cfg, cfg_file,
-                                      cfg_line, mctx, lctx, actx));
+                                      cfg_line, mctx, actx));
        }
 
        isc_ht_init(&inst->ht, mctx, 1, ISC_HT_CASE_SENSITIVE);
@@ -371,21 +369,20 @@ cleanup:
 
 isc_result_t
 plugin_check(const char *parameters, const void *cfg, const char *cfg_file,
-            unsigned long cfg_line, isc_mem_t *mctx, isc_log_t *lctx,
-            void *actx) {
+            unsigned long cfg_line, isc_mem_t *mctx, void *actx) {
        isc_result_t result = ISC_R_SUCCESS;
        cfg_parser_t *parser = NULL;
        cfg_obj_t *param_obj = NULL;
        isc_buffer_t b;
 
-       CHECK(cfg_parser_create(mctx, lctx, &parser));
+       CHECK(cfg_parser_create(mctx, &parser));
 
        isc_buffer_constinit(&b, parameters, strlen(parameters));
        isc_buffer_add(&b, strlen(parameters));
        CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line,
                               &cfg_type_parameters, 0, &param_obj));
 
-       CHECK(check_syntax(param_obj, cfg, mctx, lctx, actx));
+       CHECK(check_syntax(param_obj, cfg, mctx, actx));
 
 cleanup:
        if (param_obj != NULL) {
index 101eccdb71399c9df6a3be50e8826d6984639e29..e9ddc0c2790a56f283b86527c1fb502252028ec1 100644 (file)
@@ -526,8 +526,8 @@ rndc_start(void *arg) {
 }
 
 static void
-parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
-            cfg_parser_t **pctxp, cfg_obj_t **configp) {
+parse_config(isc_mem_t *mctx, const char *keyname, cfg_parser_t **pctxp,
+            cfg_obj_t **configp) {
        isc_result_t result;
        const char *conffile = admin_conffile;
        const cfg_obj_t *addresses = NULL;
@@ -570,7 +570,7 @@ parse_config(isc_mem_t *mctx, isc_log_t *log, const char *keyname,
                        admin_keyfile, admin_conffile);
        }
 
-       DO("create parser", cfg_parser_create(mctx, log, pctxp));
+       DO("create parser", cfg_parser_create(mctx, pctxp));
 
        /*
         * The parser will output its own errors, so DO() is not used.
@@ -806,7 +806,6 @@ int
 main(int argc, char **argv) {
        isc_result_t result = ISC_R_SUCCESS;
        bool show_final_mem = false;
-       isc_log_t *log = NULL;
        isc_logconfig_t *logconfig = NULL;
        isc_logdestination_t logdest;
        cfg_parser_t *pctx = NULL;
@@ -954,7 +953,7 @@ main(int argc, char **argv) {
 
        isc_nm_settimeouts(netmgr, timeout, timeout, timeout, 0);
 
-       logconfig = isc_logconfig_get(log);
+       logconfig = isc_logconfig_get();
        isc_log_settag(logconfig, progname);
        logdest.file.stream = stderr;
        logdest.file.name = NULL;
@@ -966,7 +965,7 @@ main(int argc, char **argv) {
        DO("enabling log channel",
           isc_log_usechannel(logconfig, "stderr", NULL, NULL));
 
-       parse_config(rndc_mctx, log, keyname, &pctx, &config);
+       parse_config(rndc_mctx, keyname, &pctx, &config);
 
        isc_buffer_allocate(rndc_mctx, &databuf, 2048);
 
index ef8b1eecd1fe2defdc43f9c6194e09cdac9a15cd..138158d027a18a431d664fb01468c15ec412bd89 100644 (file)
@@ -38,7 +38,7 @@ log_write(int level, const char *format, ...) {
        va_list args;
 
        va_start(args, format);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
-                      level, format, args);
+       isc_log_vwrite(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB, level,
+                      format, args);
        va_end(args);
 }
index 7f6022c68ceac0d0568375cfe4d29df97341b7a4..6702a323172fdc90e83d177243c351b26b3580b0 100644 (file)
@@ -54,7 +54,6 @@ typedef struct async_instance {
        isc_mem_t *mctx;
        isc_ht_t *ht;
        isc_mutex_t hlock;
-       isc_log_t *lctx;
 } async_instance_t;
 
 typedef struct state {
@@ -106,8 +105,8 @@ logmsg(const char *fmt, ...) {
        va_list ap;
 
        va_start(ap, fmt);
-       isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
-                     ISC_LOG_INFO, fmt, ap);
+       isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
+                     fmt, ap);
        va_end(ap);
 }
 
@@ -126,16 +125,15 @@ logmsg(const char *fmt, ...) {
  */
 isc_result_t
 plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
-               unsigned long cfg_line, isc_mem_t *mctx, isc_log_t *lctx,
-               void *actx, ns_hooktable_t *hooktable, void **instp) {
+               unsigned long cfg_line, isc_mem_t *mctx, void *actx,
+               ns_hooktable_t *hooktable, void **instp) {
        async_instance_t *inst = NULL;
 
        UNUSED(parameters);
        UNUSED(cfg);
        UNUSED(actx);
 
-       isc_log_write(lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
-                     ISC_LOG_INFO,
+       isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
                      "registering 'test-async' module from %s:%lu", cfg_file,
                      cfg_line);
 
@@ -158,14 +156,12 @@ plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
 
 isc_result_t
 plugin_check(const char *parameters, const void *cfg, const char *cfg_file,
-            unsigned long cfg_line, isc_mem_t *mctx, isc_log_t *lctx,
-            void *actx) {
+            unsigned long cfg_line, isc_mem_t *mctx, void *actx) {
        UNUSED(parameters);
        UNUSED(cfg);
        UNUSED(cfg_file);
        UNUSED(cfg_line);
        UNUSED(mctx);
-       UNUSED(lctx);
        UNUSED(actx);
 
        return (ISC_R_SUCCESS);
index f57ba407752965fee0dfc88f51d69f836597386f..d13a9b26a68ffc6c41e2cf1dd444d46414dfbcf2 100644 (file)
@@ -30,7 +30,6 @@
 #include <dns/types.h>
 
 isc_mem_t *mctx = NULL;
-isc_log_t *lctx = NULL;
 
 /*
  * Logging categories: this needs to match the list in bin/named/log.c.
@@ -92,10 +91,10 @@ main(int argc, char **argv) {
        isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
        isc_mem_create(&mctx);
 
-       isc_log_registercategories(lctx, categories);
-       dns_log_init(lctx);
+       isc_log_registercategories(categories);
+       dns_log_init();
 
-       logconfig = isc_logconfig_get(lctx);
+       logconfig = isc_logconfig_get();
        destination.file.stream = stderr;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
index c3b858683fa184b85d0076af0c79f3c97d5e8437..8b1d77d6b0938472f80dafdf9c78b3970ac4830b 100644 (file)
@@ -46,7 +46,6 @@ dns_fixedname_t fname;
 dns_name_t *name;
 unsigned int bits = 2048U;
 isc_mem_t *mctx;
-isc_log_t *log_;
 isc_logconfig_t *logconfig;
 int level = ISC_LOG_WARNING;
 isc_logdestination_t destination;
@@ -106,9 +105,9 @@ main(int argc, char **argv) {
 
        isc_mem_create(&mctx);
 
-       dns_log_init(log_);
+       dns_log_init();
 
-       logconfig = isc_logconfig_get(log_);
+       logconfig = isc_logconfig_get();
        isc_log_settag(logconfig, "bigkey");
 
        destination.file.stream = stderr;
index c047074acfbf5282447bc9b8d8622c4253163949..fb2c5af524b1f89b23938d24438c29868bfbb1b8 100644 (file)
@@ -36,15 +36,14 @@ usage(void) {
 /*
  * Setup logging to use stderr.
  */
-static isc_result_t
-setup_logging(isc_mem_t *mctx ISC_ATTR_UNUSED, FILE *errout, isc_log_t **logp) {
+static void
+setup_logging(FILE *errout) {
        isc_logdestination_t destination;
        isc_logconfig_t *logconfig = NULL;
-       isc_log_t *log = NULL;
 
-       dns_log_init(log);
+       dns_log_init();
 
-       logconfig = isc_logconfig_get(log);
+       logconfig = isc_logconfig_get();
        destination.file.stream = errout;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
@@ -54,9 +53,6 @@ setup_logging(isc_mem_t *mctx ISC_ATTR_UNUSED, FILE *errout, isc_log_t **logp) {
 
        RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr", NULL, NULL) ==
                      ISC_R_SUCCESS);
-
-       *logp = log;
-       return (ISC_R_SUCCESS);
 }
 
 int
@@ -64,7 +60,6 @@ main(int argc, char **argv) {
        char *file;
        isc_mem_t *mctx = NULL;
        isc_result_t result;
-       isc_log_t *lctx = NULL;
        uint32_t flags = 0U;
        int ch;
        bool compact = false;
@@ -108,7 +103,7 @@ main(int argc, char **argv) {
        file = argv[0];
 
        isc_mem_create(&mctx);
-       RUNTIME_CHECK(setup_logging(mctx, stderr, &lctx) == ISC_R_SUCCESS);
+       setup_logging(stderr);
 
        if (upgrade) {
                flags = DNS_JOURNAL_COMPACTALL;
index 437aa8803396fb576293734031d9f728d5e66b4d..358539cccb2ca840835cb8b2c1669d124cfe9e3a 100644 (file)
@@ -1047,20 +1047,15 @@ for the category at all.
 
 ##### Externally visible structure
 
-The types used by programs for configuring log message destinations are
-`isc_log_t` and `isc_logconfig_t`.  The `isc_log_t` type is normally
-created only once by a program, to hold static information about what
-categories and modules exist in the program and some other housekeeping
-information.  `isc_logconfig_t` is used to store the configurable
-specification of message destinations, which can be changed during the
-course of the program.
-
-A starting configuration (`isc_logconfig_t`) is created implicitly when
-the context (`isc_log_t`) is created.  The pointer to this configuration
-is returned via a parameter to `isc_log_create()` so that it can then be
-configured.  A new log configuration can be established by creating
-it with `isc_logconfig_create()`, configuring it, then installing it as
-the active configuration with `isc_logconfig_set()`.
+The type used by programs for configuring log message destinations is
+`isc_logconfig_t`.  It is used to store the configurable specification of
+message destinations, which can be changed during the course of the program.
+
+A starting configuration (`isc_logconfig_t`) is created implicitly.  The pointer
+to this configuration is returned via `isc_logconfig_get()` so that it can then
+be configured.  A new log configuration can be established by creating it with
+`isc_logconfig_create()`, configuring it, then installing it as the active
+configuration with `isc_logconfig_set()`.
 
 ##### Logging in multithreaded programs
 
@@ -1088,18 +1083,16 @@ the following steps need to be taken to initialize it.
    rudimentary initialization of both.
 
         isc_mem_t *mctx;
-        isc_log_t *lctx;
         isc_logconfig_t *lcfg;
 
-        isc_mem_create(&mctx);
-        isc_log_create(mctx, &lctx, &lcfg) != ISC_R_SUCCESS);
+        lcfg = isc_logconfig_get();
 
 1. Initialize any additional libraries.  The convention for the name of
    the initialization function is `{library}_log_init()`, with a pointer to
    the logging context as an argument.  The function can only be called
    once in a program or it will generate an assertion.
 
-        `dns_log_init(lctx);`
+        `dns_log_init();`
 
    If you do not want a library to write any log messages, simply do not
    call its the initialization function.
@@ -1164,14 +1157,14 @@ There are three additional functions you might find useful in your program
 to control logging behavior, two to work with the debugging level and one
 to control the closing of log files.
 
-        void isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level);
-        unsigned int isc_log_getdebuglevel(isc_log_t *lctx);
+        void isc_log_setdebuglevel(unsigned int level);
+        unsigned int isc_log_getdebuglevel();
 
 These set and retrieve the current debugging level of the program.
 `isc_log_getdebuglevel()` can be used so that you need not keep track of
 the level yourself in another variable.
 
-        void isc_log_closefilelogs(isc_log_t *lcxt);
+        void isc_log_closefilelogs();
 
 This function closes any open log files.  This is useful for programs that
 do not want to do file rotation as with the internal rolling mechanism.
index 6d53fd2442525c8a394e624f5eab0fa9bb27c5b9..c7cbc506ca91272c43160e1b88cf7e7b925fd9ec 100644 (file)
@@ -59,7 +59,6 @@ int
 main(int argc, char **argv) {
        isc_result_t result;
        isc_mem_t *mctx = NULL;
-       isc_log_t *lctx = NULL;
        isc_logconfig_t *lcfg = NULL;
        isc_logdestination_t destination;
        cfg_parser_t *pctx = NULL;
@@ -76,7 +75,7 @@ main(int argc, char **argv) {
        /*
         * Create and install the default channel.
         */
-       lcfg = isc_logconfig_get(lctx);
+       lcfg = isc_logconfig_get();
        destination.file.stream = stderr;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
@@ -90,7 +89,7 @@ main(int argc, char **argv) {
        /*
         * Set the initial debug level.
         */
-       isc_log_setdebuglevel(lctx, 2);
+       isc_log_setdebuglevel(2);
 
        if (argc < 3) {
                usage();
@@ -156,8 +155,7 @@ main(int argc, char **argv) {
                if (type == NULL || filename == NULL) {
                        usage();
                }
-               RUNTIME_CHECK(cfg_parser_create(mctx, lctx, &pctx) ==
-                             ISC_R_SUCCESS);
+               RUNTIME_CHECK(cfg_parser_create(mctx, &pctx) == ISC_R_SUCCESS);
 
                result = cfg_parse_file(pctx, filename, type, &cfg);
 
index 23da59c330219d2d888392d6068ead070e344090..ae6a4ef8acc25f585d74033a5957364450191f2d 100644 (file)
@@ -480,8 +480,8 @@ DP(int level, const char *format, ...) {
        va_list args;
 
        va_start(args, format);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_ADB,
-                      level, format, args);
+       isc_log_vwrite(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_ADB, level,
+                      format, args);
        va_end(args);
 }
 
@@ -1463,8 +1463,7 @@ log_quota(dns_adbentry_t *entry, const char *fmt, ...) {
        isc_netaddr_fromsockaddr(&netaddr, &entry->sockaddr);
        isc_netaddr_format(&netaddr, addrbuf, sizeof(addrbuf));
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_ADB,
-                     ISC_LOG_INFO,
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_ADB, ISC_LOG_INFO,
                      "adb: quota %s (%" PRIuFAST32 "/%" PRIuFAST32 "): %s",
                      addrbuf, atomic_load_relaxed(&entry->active),
                      atomic_load_relaxed(&entry->quota), msgbuf);
@@ -1968,7 +1967,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg,
                REQUIRE(loop != NULL);
        }
 
-       if (isc_log_wouldlog(dns_lctx, DEF_LEVEL)) {
+       if (isc_log_wouldlog(DEF_LEVEL)) {
                dns_name_format(name, namebuf, sizeof(namebuf));
        }
 
index e034155efc97532c7417144aa6b8357a1124076e..4f144f629bdf61bb3919f200820d76c445565092 100644 (file)
@@ -54,8 +54,7 @@ isclog_error_callback(dns_rdatacallbacks_t *callbacks, const char *fmt, ...) {
        UNUSED(callbacks);
 
        va_start(ap, fmt);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                      DNS_LOGMODULE_MASTER, /* XXX */
+       isc_log_vwrite(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, /* XXX */
                       ISC_LOG_ERROR, fmt, ap);
        va_end(ap);
 }
@@ -68,8 +67,7 @@ isclog_warn_callback(dns_rdatacallbacks_t *callbacks, const char *fmt, ...) {
 
        va_start(ap, fmt);
 
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                      DNS_LOGMODULE_MASTER, /* XXX */
+       isc_log_vwrite(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER, /* XXX */
                       ISC_LOG_WARNING, fmt, ap);
        va_end(ap);
 }
index cacd5d59d4927a3adf729f7bd39ea680d6dddcd1..07d6dc41ab68335e1e06b01650e828494f4f9a5e 100644 (file)
@@ -565,8 +565,8 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) {
 
                dns_name_format(&nentry->name, zname, DNS_NAME_FORMATSIZE);
 
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_DEBUG(3),
                              "catz: iterating over '%s' from catalog '%s'",
                              zname, czname);
                dns_catz_options_setdefault(catz->catzs->mctx,
@@ -598,7 +598,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) {
                        {
                                dns_name_format(&parentcatz->name, pczname,
                                                DNS_NAME_FORMATSIZE);
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_MASTER,
                                              ISC_LOG_DEBUG(3),
                                              "catz: zone '%s' "
@@ -608,7 +608,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) {
                                result = delzone(nentry, parentcatz,
                                                 parentcatz->catzs->view,
                                                 parentcatz->catzs->zmm->udata);
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_MASTER,
                                              ISC_LOG_INFO,
                                              "catz: deleting zone '%s' "
@@ -641,7 +641,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) {
                                 * perform deletions earlier than additions and
                                 * modifications.
                                 */
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_MASTER,
                                              ISC_LOG_INFO,
                                              "catz: zone '%s' unique label "
@@ -655,7 +655,7 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) {
                }
 
                if (find_result != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_DEBUG(3),
                                      "catz: zone '%s' was expected to exist "
                                      "but can not be found, will be restored",
@@ -695,8 +695,8 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) {
                dns_name_format(&entry->name, zname, DNS_NAME_FORMATSIZE);
                result = delzone(entry, catz, catz->catzs->view,
                                 catz->catzs->zmm->udata);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_INFO,
                              "catz: deleting zone '%s' from catalog '%s' - %s",
                              zname, czname, isc_result_totext(result));
                dns_catz_entry_detach(catz, &entry);
@@ -716,8 +716,8 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) {
                dns_name_format(&entry->name, zname, DNS_NAME_FORMATSIZE);
                result = addzone(entry, catz, catz->catzs->view,
                                 catz->catzs->zmm->udata);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_INFO,
                              "catz: adding zone '%s' from catalog "
                              "'%s' - %s",
                              zname, czname, isc_result_totext(result));
@@ -732,8 +732,8 @@ dns__catz_zones_merge(dns_catz_zone_t *catz, dns_catz_zone_t *newcatz) {
                dns_name_format(&entry->name, zname, DNS_NAME_FORMATSIZE);
                result = modzone(entry, catz, catz->catzs->view,
                                 catz->catzs->zmm->udata);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_INFO,
                              "catz: modifying zone '%s' from catalog "
                              "'%s' - %s",
                              zname, czname, isc_result_totext(result));
@@ -855,8 +855,8 @@ dns__catz_timer_start(dns_catz_zone_t *catz) {
                char dname[DNS_NAME_FORMATSIZE];
 
                dns_name_format(&catz->name, dname, DNS_NAME_FORMATSIZE);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_INFO,
                              "catz: %s: new zone version came "
                              "too soon, deferring update for "
                              "%" PRIu64 " seconds",
@@ -897,7 +897,7 @@ dns_catz_zone_add(dns_catz_zones_t *catzs, const dns_name_t *name,
        char zname[DNS_NAME_FORMATSIZE];
 
        dns_name_format(name, zname, DNS_NAME_FORMATSIZE);
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
                      ISC_LOG_DEBUG(3), "catz: dns_catz_zone_add %s", zname);
 
        LOCK(&catzs->lock);
@@ -1187,8 +1187,8 @@ catz_process_coo(dns_catz_zone_t *catz, dns_label_t *mhash,
        }
 
        if (dns_rdataset_count(value) != 1) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_WARNING,
                              "catz: 'coo' property PTR RRset contains "
                              "more than one record, which is invalid");
                catz->broken = true;
@@ -1246,8 +1246,8 @@ catz_process_zones_entry(dns_catz_zone_t *catz, dns_rdataset_t *value,
        }
 
        if (dns_rdataset_count(value) != 1) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_WARNING,
                              "catz: member zone PTR RRset contains "
                              "more than one record, which is invalid");
                catz->broken = true;
@@ -1307,8 +1307,8 @@ catz_process_version(dns_catz_zone_t *catz, dns_rdataset_t *value) {
        }
 
        if (dns_rdataset_count(value) != 1) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_WARNING,
                              "catz: 'version' property TXT RRset contains "
                              "more than one record, which is invalid");
                catz->broken = true;
@@ -1359,8 +1359,8 @@ catz_process_version(dns_catz_zone_t *catz, dns_rdataset_t *value) {
 cleanup:
        dns_rdata_freestruct(&rdatatxt);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_WARNING,
                              "catz: invalid record for the catalog "
                              "zone version property");
                catz->broken = true;
@@ -1572,8 +1572,8 @@ catz_process_apl(dns_catz_zone_t *catz, isc_buffer_t **aclbp,
        }
 
        if (dns_rdataset_count(value) > 1) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_WARNING,
                              "catz: more than one APL entry for member zone, "
                              "result is undefined");
        }
@@ -1713,8 +1713,8 @@ catz_entry_add_or_mod(dns_catz_zone_t *catz, isc_ht_t *ht, unsigned char *key,
        isc_result_t result = isc_ht_add(ht, key, (uint32_t)keysize, nentry);
 
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "catz: error %s zone '%s' from catalog '%s' - %s",
                              msg, zname, czname, isc_result_totext(result));
        }
@@ -1811,8 +1811,8 @@ dns__catz_update_process(dns_catz_zone_t *catz, const dns_name_t *src_name,
        REQUIRE(ISC_MAGIC_VALID(src_name, DNS_NAME_MAGIC));
 
        if (rdataset->rdclass != dns_rdataclass_in) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "catz: RR found which has a non-IN class");
                catz->broken = true;
                return (ISC_R_FAILURE);
@@ -1998,7 +1998,7 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *catz, dns_catz_entry_t *entry,
                default:
                        dns_name_format(&entry->name, zname,
                                        DNS_NAME_FORMATSIZE);
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                      "catz: zone '%s' uses an invalid primary "
                                      "(no IP address assigned)",
@@ -2093,8 +2093,8 @@ dns__catz_timer_cb(void *arg) {
        dns_name_format(&catz->name, domain, DNS_NAME_FORMATSIZE);
 
        if (!catz->active) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_INFO,
                              "catz: %s: no longer active, reload is canceled",
                              domain);
                catz->updaterunning = false;
@@ -2106,7 +2106,7 @@ dns__catz_timer_cb(void *arg) {
        catz->updbversion = catz->dbversion;
        catz->dbversion = NULL;
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
                      ISC_LOG_INFO, "catz: %s: reload start", domain);
 
        dns_catz_zone_ref(catz);
@@ -2175,8 +2175,8 @@ dns_catz_dbupdate_callback(dns_db_t *db, void *fn_arg) {
 
                catz->updatepending = true;
                dns_name_format(&catz->name, dname, DNS_NAME_FORMATSIZE);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_DEBUG(3),
                              "catz: %s: update already queued or running",
                              dname);
                if (catz->dbversion != NULL) {
@@ -2269,16 +2269,16 @@ dns__catz_update_cb(void *data) {
        UNLOCK(&catzs->lock);
        if (result != ISC_R_SUCCESS) {
                /* This can happen if we remove the zone in the meantime. */
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
-                             "catz: zone '%s' not in config", bname);
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR, "catz: zone '%s' not in config",
+                             bname);
                goto exit;
        }
 
        if (!is_active) {
                /* This can happen during a reconfiguration. */
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_INFO,
                              "catz: zone '%s' is no longer active", bname);
                result = ISC_R_CANCELED;
                goto exit;
@@ -2287,22 +2287,22 @@ dns__catz_update_cb(void *data) {
        result = dns_db_getsoaserial(updb, oldcatz->updbversion, &vers);
        if (result != ISC_R_SUCCESS) {
                /* A zone without SOA record?!? */
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "catz: zone '%s' has no SOA record (%s)", bname,
                              isc_result_totext(result));
                goto exit;
        }
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
                      ISC_LOG_INFO,
                      "catz: updating catalog zone '%s' with serial %" PRIu32,
                      bname, vers);
 
        result = dns_db_createiterator(updb, DNS_DB_NONSEC3, &updbit);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "catz: failed to create DB iterator - %s",
                              isc_result_totext(result));
                goto exit;
@@ -2318,8 +2318,8 @@ dns__catz_update_cb(void *data) {
        result = dns_name_fromstring(name, "version", &updb->origin, 0, NULL);
        if (result != ISC_R_SUCCESS) {
                dns_dbiterator_destroy(&updbit);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "catz: failed to create name from string - %s",
                              isc_result_totext(result));
                goto exit;
@@ -2328,8 +2328,8 @@ dns__catz_update_cb(void *data) {
        result = dns_dbiterator_seek(updbit, name);
        if (result != ISC_R_SUCCESS) {
                dns_dbiterator_destroy(&updbit);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "catz: zone '%s' has no 'version' record (%s) "
                              "and will not be processed",
                              bname, isc_result_totext(result));
@@ -2350,7 +2350,7 @@ dns__catz_update_cb(void *data) {
 
                result = dns_dbiterator_current(updbit, &node, name);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                      "catz: failed to get db iterator - %s",
                                      isc_result_totext(result));
@@ -2373,7 +2373,7 @@ dns__catz_update_cb(void *data) {
                result = dns_db_allrdatasets(updb, node, oldcatz->updbversion,
                                             0, 0, &rdsiter);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                      "catz: failed to fetch rrdatasets - %s",
                                      isc_result_totext(result));
@@ -2417,7 +2417,7 @@ dns__catz_update_cb(void *data) {
                                                      sizeof(classbuf));
                                dns_rdatatype_format(rdataset.type, typebuf,
                                                     sizeof(typebuf));
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_MASTER,
                                              ISC_LOG_WARNING,
                                              "catz: invalid record in catalog "
@@ -2443,7 +2443,7 @@ dns__catz_update_cb(void *data) {
        }
 
        dns_dbiterator_destroy(&updbit);
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
                      ISC_LOG_DEBUG(3),
                      "catz: update_from_db: iteration finished: %s",
                      isc_result_totext(result));
@@ -2455,13 +2455,13 @@ dns__catz_update_cb(void *data) {
                            ? oldcatz->version
                            : newcatz->version;
        if (catz_vers == DNS_CATZ_VERSION_UNDEFINED) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_WARNING,
                              "catz: zone '%s' version is not set", bname);
                newcatz->broken = true;
        } else if (catz_vers != 1 && catz_vers != 2) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_WARNING,
                              "catz: zone '%s' unsupported version "
                              "'%" PRIu32 "'",
                              bname, catz_vers);
@@ -2472,8 +2472,8 @@ dns__catz_update_cb(void *data) {
 
        if (newcatz->broken) {
                dns_name_format(name, cname, DNS_NAME_FORMATSIZE);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "catz: new catalog zone '%s' is broken and "
                              "will not be processed",
                              bname);
@@ -2488,15 +2488,14 @@ dns__catz_update_cb(void *data) {
        result = dns__catz_zones_merge(oldcatz, newcatz);
        dns_catz_zone_detach(&newcatz);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
-                             "catz: failed merging zones: %s",
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR, "catz: failed merging zones: %s",
                              isc_result_totext(result));
 
                goto exit;
        }
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
                      ISC_LOG_DEBUG(3),
                      "catz: update_from_db: new zone merged");
 
@@ -2526,7 +2525,7 @@ dns__catz_done_cb(void *data) {
 
        UNLOCK(&catz->catzs->lock);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
                      ISC_LOG_INFO, "catz: %s: reload done: %s", dname,
                      isc_result_totext(catz->updateresult));
 
@@ -2572,7 +2571,7 @@ dns_catz_postreconfig(dns_catz_zones_t *catzs) {
                        char cname[DNS_NAME_FORMATSIZE];
                        dns_name_format(&catz->name, cname,
                                        DNS_NAME_FORMATSIZE);
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_WARNING,
                                      "catz: removing catalog zone %s", cname);
 
index 34086f713dbd97e2a986d06cb3bc7714f5034825..51c4bd04c40f96628777a02b30b9158500ee7d20 100644 (file)
@@ -158,8 +158,8 @@ dns_db_create(isc_mem_t *mctx, const char *db_type, const dns_name_t *origin,
 
        RWUNLOCK(&implock, isc_rwlocktype_read);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DB,
-                     ISC_LOG_ERROR, "unsupported database type '%s'", db_type);
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DB, ISC_LOG_ERROR,
+                     "unsupported database type '%s'", db_type);
 
        return (ISC_R_NOTFOUND);
 }
index b25c77f7c51aceb504fa17d5679a755327f08637..2d92cce224fe5734491bd015a0747807057fd13e 100644 (file)
@@ -42,9 +42,6 @@
                        goto failure;        \
        } while (0)
 
-#define DIFF_COMMON_LOGARGS \
-       dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_DIFF
-
 static dns_rdatatype_t
 rdata_covers(dns_rdata_t *rdata) {
        return (rdata->type == dns_rdatatype_rrsig ? dns_rdata_covers(rdata)
@@ -346,7 +343,8 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) {
                                        dns_rdataclass_format(t->rdata.rdclass,
                                                              classbuf,
                                                              sizeof(classbuf));
-                                       isc_log_write(DIFF_COMMON_LOGARGS,
+                                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                                     DNS_LOGMODULE_DIFF,
                                                      ISC_LOG_WARNING,
                                                      "'%s/%s/%s': TTL differs "
                                                      "in "
@@ -428,7 +426,8 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) {
                                        dns_rdataclass_format(dns_db_class(db),
                                                              classbuf,
                                                              sizeof(classbuf));
-                                       isc_log_write(DIFF_COMMON_LOGARGS,
+                                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                                     DNS_LOGMODULE_DIFF,
                                                      ISC_LOG_WARNING,
                                                      "%s/%s: dns_diff_apply: "
                                                      "update with no effect",
@@ -465,7 +464,8 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver, bool warn) {
                                        dns_rdataclass_format(rdclass, classbuf,
                                                              sizeof(classbuf));
                                        isc_log_write(
-                                               DIFF_COMMON_LOGARGS,
+                                               DNS_LOGCATEGORY_GENERAL,
+                                               DNS_LOGMODULE_DIFF,
                                                ISC_LOG_ERROR,
                                                "dns_diff_apply: %s/%s/%s: %s "
                                                "%s",
@@ -557,7 +557,8 @@ dns_diff_load(dns_diff_t *diff, dns_rdatacallbacks_t *callbacks) {
                        result = callbacks->add(callbacks->add_private, name,
                                                &rds DNS__DB_FILELINE);
                        if (result == DNS_R_UNCHANGED) {
-                               isc_log_write(DIFF_COMMON_LOGARGS,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                             DNS_LOGMODULE_DIFF,
                                              ISC_LOG_WARNING,
                                              "dns_diff_load: "
                                              "update with no effect");
@@ -707,7 +708,8 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
                        fprintf(file, "%s %.*s\n", op, (int)r.length,
                                (char *)r.base);
                } else {
-                       isc_log_write(DIFF_COMMON_LOGARGS, ISC_LOG_DEBUG(7),
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_DIFF, ISC_LOG_DEBUG(7),
                                      "%s %.*s", op, (int)r.length,
                                      (char *)r.base);
                }
index e5412abe9eb455ebac686329d73a94a45abd4d2c..1a4565723cbfbbfdb68bd1a2c3e6d920da3ab94d 100644 (file)
@@ -250,7 +250,7 @@ mgr_log(dns_dispatchmgr_t *mgr, int level, const char *fmt, ...) {
        char msgbuf[2048];
        va_list ap;
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -258,9 +258,8 @@ mgr_log(dns_dispatchmgr_t *mgr, int level, const char *fmt, ...) {
        vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
        va_end(ap);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DISPATCH,
-                     DNS_LOGMODULE_DISPATCH, level, "dispatchmgr %p: %s", mgr,
-                     msgbuf);
+       isc_log_write(DNS_LOGCATEGORY_DISPATCH, DNS_LOGMODULE_DISPATCH, level,
+                     "dispatchmgr %p: %s", mgr, msgbuf);
 }
 
 static void
@@ -287,7 +286,7 @@ dispatch_log(dns_dispatch_t *disp, int level, const char *fmt, ...) {
        va_list ap;
        int r;
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -301,9 +300,8 @@ dispatch_log(dns_dispatch_t *disp, int level, const char *fmt, ...) {
        }
        va_end(ap);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DISPATCH,
-                     DNS_LOGMODULE_DISPATCH, level, "dispatch %p: %s", disp,
-                     msgbuf);
+       isc_log_write(DNS_LOGCATEGORY_DISPATCH, DNS_LOGMODULE_DISPATCH, level,
+                     "dispatch %p: %s", disp, msgbuf);
 }
 
 static void
@@ -316,7 +314,7 @@ dispentry_log(dns_dispentry_t *resp, int level, const char *fmt, ...) {
        va_list ap;
        int r;
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -536,7 +534,7 @@ udp_recv(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
                          NULL) == ISC_R_SUCCESS &&
            match > 0)
        {
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(10))) {
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(10))) {
                        char netaddrstr[ISC_NETADDR_FORMATSIZE];
                        isc_netaddr_format(&netaddr, netaddrstr,
                                           sizeof(netaddrstr));
@@ -1195,7 +1193,7 @@ dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, const isc_sockaddr_t *localaddr,
                rcu_read_unlock();
        }
 
-       if (isc_log_wouldlog(dns_lctx, 90)) {
+       if (isc_log_wouldlog(90)) {
                char addrbuf[ISC_SOCKADDR_FORMATSIZE];
 
                isc_sockaddr_format(&disp->local, addrbuf,
@@ -1331,7 +1329,7 @@ dispatch_createudp(dns_dispatchmgr_t *mgr, const isc_sockaddr_t *localaddr,
 
        dispatch_allocate(mgr, isc_socktype_udp, tid, &disp);
 
-       if (isc_log_wouldlog(dns_lctx, 90)) {
+       if (isc_log_wouldlog(90)) {
                char addrbuf[ISC_SOCKADDR_FORMATSIZE];
 
                isc_sockaddr_format(localaddr, addrbuf,
@@ -1794,7 +1792,7 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
        dns_dispentry_t *next = NULL;
        dns_displist_t resps = ISC_LIST_INITIALIZER;
 
-       if (isc_log_wouldlog(dns_lctx, 90)) {
+       if (isc_log_wouldlog(90)) {
                char localbuf[ISC_SOCKADDR_FORMATSIZE];
                char peerbuf[ISC_SOCKADDR_FORMATSIZE];
                if (handle != NULL) {
index 475d6849cda49c47e974fc37d6ce1cc1d52a27ff..f7aa071a885acb9c64ffe318a78fa443e61f3825 100644 (file)
@@ -177,9 +177,8 @@ dns_dlzcreate(isc_mem_t *mctx, const char *dlzname, const char *drivername,
        REQUIRE(mctx != NULL);
 
        /* write log message */
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
-                     ISC_LOG_INFO, "Loading '%s' using driver %s", dlzname,
-                     drivername);
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_INFO,
+                     "Loading '%s' using driver %s", dlzname, drivername);
 
        /* lock the dlz_implementations list so we can search it. */
        RWLOCK(&dlz_implock, isc_rwlocktype_read);
@@ -189,8 +188,8 @@ dns_dlzcreate(isc_mem_t *mctx, const char *dlzname, const char *drivername,
        if (impinfo == NULL) {
                RWUNLOCK(&dlz_implock, isc_rwlocktype_read);
 
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+                             ISC_LOG_ERROR,
                              "unsupported DLZ database driver '%s'."
                              "  %s not loaded.",
                              drivername, dlzname);
@@ -221,12 +220,12 @@ dns_dlzcreate(isc_mem_t *mctx, const char *dlzname, const char *drivername,
 
        db->magic = DNS_DLZ_MAGIC;
        isc_mem_attach(mctx, &db->mctx);
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
                      ISC_LOG_DEBUG(2), "DLZ driver loaded successfully.");
        *dbp = db;
        return (ISC_R_SUCCESS);
 failure:
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
                      ISC_LOG_ERROR, "DLZ driver failed to load.");
 
        /* impinfo->methods->create failed. */
@@ -241,7 +240,7 @@ dns_dlzdestroy(dns_dlzdb_t **dbp) {
        dns_dlzdb_t *db;
 
        /* Write debugging message to log */
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
                      ISC_LOG_DEBUG(2), "Unloading DLZ driver.");
 
        /*
@@ -277,7 +276,7 @@ dns_dlzregister(const char *drivername, const dns_dlzmethods_t *methods,
        dns_dlzimplementation_t *dlz_imp;
 
        /* Write debugging message to log */
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
                      ISC_LOG_DEBUG(2), "Registering DLZ driver '%s'",
                      drivername);
 
@@ -307,8 +306,8 @@ dns_dlzregister(const char *drivername, const dns_dlzmethods_t *methods,
         */
        dlz_imp = dlz_impfind(drivername);
        if (dlz_imp != NULL) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2),
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+                             ISC_LOG_DEBUG(2),
                              "DLZ Driver '%s' already registered", drivername);
                RWUNLOCK(&dlz_implock, isc_rwlocktype_write);
                return (ISC_R_EXISTS);
@@ -365,7 +364,7 @@ dns_dlzunregister(dns_dlzimplementation_t **dlzimp) {
        dns_dlzimplementation_t *dlz_imp;
 
        /* Write debugging message to log */
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
                      ISC_LOG_DEBUG(2), "Unregistering DLZ driver.");
 
        /*
@@ -431,8 +430,8 @@ dns_dlz_writeablezone(dns_view_t *view, dns_dlzdb_t *dlzdb,
        origin = dns_fixedname_name(&fixorigin);
 
        if (!dlzdb->search) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DLZ, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+                             ISC_LOG_WARNING,
                              "DLZ %s has 'search no;', but attempted to "
                              "register writeable zone %s.",
                              dlzdb->dlzname, zone_name);
@@ -518,8 +517,8 @@ dns_dlz_ssumatch(dns_dlzdb_t *dlzdatabase, const dns_name_t *signer,
        impl = dlzdatabase->implementation;
 
        if (impl->methods->ssumatch == NULL) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DLZ, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+                             ISC_LOG_INFO,
                              "No ssumatch method for DLZ database");
                return (false);
        }
index d9a81e226a762c48fe493718e2040a49bed60b97..a3b83e11e89d2985ab261a66bdb71958ad10af77 100644 (file)
@@ -120,8 +120,8 @@ dnsrps_log_fnc(librpz_log_level_t level, void *ctxt, const char *buf) {
                isc_level = DNS_RPZ_ERROR_LEVEL;
                break;
        }
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
-                     isc_level, "dnsrps: %s", buf);
+       isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, isc_level,
+                     "dnsrps: %s", buf);
 }
 
 /*
@@ -150,12 +150,10 @@ dns_dnsrps_server_create(const char *librpz_path) {
        librpz->set_log(dnsrps_log_fnc, NULL);
 
        clist = librpz->clist_create(&emsg, dnsrps_lock, dnsrps_unlock,
-                                    dnsrps_mutex_destroy, &dnsrps_mutex,
-                                    dns_lctx);
+                                    dnsrps_mutex_destroy, &dnsrps_mutex, NULL);
        if (clist == NULL) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                             DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
-                             "dnsrps: %s", emsg.c);
+               isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                             DNS_RPZ_ERROR_LEVEL, "dnsrps: %s", emsg.c);
                return (ISC_R_NOMEMORY);
        }
        return (ISC_R_SUCCESS);
@@ -175,8 +173,8 @@ dns_dnsrps_server_destroy(void) {
        if (librpz != NULL) {
                INSIST(librpz_handle != NULL);
                if (dlclose(librpz_handle) != 0) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                                     DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
+                       isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                                     DNS_RPZ_ERROR_LEVEL,
                                      "dnsrps: dlclose(): %s", dlerror());
                }
                librpz_handle = NULL;
@@ -192,14 +190,14 @@ isc_result_t
 dns_dnsrps_view_init(dns_rpz_zones_t *new, char *rps_cstr) {
        librpz_emsg_t emsg;
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+       isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
                      DNS_RPZ_DEBUG_LEVEL3, "dnsrps configuration \"%s\"",
                      rps_cstr);
 
        new->rps_client = librpz->client_create(&emsg, clist, rps_cstr, false);
        if (new->rps_client == NULL) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                             DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
+               isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                             DNS_RPZ_ERROR_LEVEL,
                              "librpz->client_create(): %s", emsg.c);
                new->p.dnsrps_enabled = false;
                return (ISC_R_FAILURE);
@@ -224,20 +222,20 @@ dns_dnsrps_connect(dns_rpz_zones_t *rpzs) {
         * Fail only if we failed to link to librpz.
         */
        if (librpz == NULL) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                             DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
-                             "librpz->connect(): %s", librpz_lib_open_emsg.c);
+               isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                             DNS_RPZ_ERROR_LEVEL, "librpz->connect(): %s",
+                             librpz_lib_open_emsg.c);
                return (ISC_R_FAILURE);
        }
 
        if (!librpz->connect(&emsg, rpzs->rps_client, true)) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                             DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
-                             "librpz->connect(): %s", emsg.c);
+               isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                             DNS_RPZ_ERROR_LEVEL, "librpz->connect(): %s",
+                             emsg.c);
                return (ISC_R_SUCCESS);
        }
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+       isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
                      DNS_RPZ_INFO_LEVEL, "dnsrps: librpz version %s",
                      librpz->version);
 
index ffb033b0083908fcffe9acbf7a5acf4c28b440e3..8b8554043a14720a476ea30f1e8f60bac61cc099 100644 (file)
@@ -562,8 +562,8 @@ again:
        if (ret == ISC_R_SUCCESS && downcase) {
                char namebuf[DNS_NAME_FORMATSIZE];
                dns_name_format(&sig.signer, namebuf, sizeof(namebuf));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_DEBUG(1),
                              "successfully validated after lower casing "
                              "signer '%s'",
                              namebuf);
@@ -1307,7 +1307,7 @@ findmatchingkeys(const char *directory, char *namebuf, unsigned int len,
                }
 
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
                                      "dns_dnssec_findmatchingkeys: "
                                      "error reading key file %s: %s",
@@ -1659,7 +1659,7 @@ dns_dnssec_keylistfromrdataset(const dns_name_t *origin, dns_kasp_t *kasp,
                                         algbuf, dst_key_id(dnskey));
                        }
 
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
                                      "dns_dnssec_keylistfromrdataset: error "
                                      "reading %s: %s",
@@ -1861,8 +1861,8 @@ add_cds(dns_dnsseckey_t *key, dns_rdata_t *keyrdata, const char *keystr,
                char algbuf[DNS_DSDIGEST_FORMATSIZE];
                dns_dsdigest_format(digesttype, algbuf,
                                    DNS_DSDIGEST_FORMATSIZE);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_ERROR,
                              "build rdata CDS (%s) for key %s failed", algbuf,
                              keystr);
                return (r);
@@ -1873,8 +1873,8 @@ add_cds(dns_dnsseckey_t *key, dns_rdata_t *keyrdata, const char *keystr,
                char algbuf[DNS_DSDIGEST_FORMATSIZE];
                dns_dsdigest_format(digesttype, algbuf,
                                    DNS_DSDIGEST_FORMATSIZE);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_INFO,
                              "CDS (%s) for key %s is now published", algbuf,
                              keystr);
                addrdata(&cdsrdata, diff, origin, ttl, mctx);
@@ -1901,8 +1901,8 @@ delete_cds(dns_dnsseckey_t *key, dns_rdata_t *keyrdata, const char *keystr,
                char algbuf[DNS_DSDIGEST_FORMATSIZE];
                dns_dsdigest_format(digesttype, algbuf,
                                    DNS_DSDIGEST_FORMATSIZE);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_INFO,
                              "CDS (%s) for key %s is now deleted", algbuf,
                              keystr);
                delrdata(&cdsrdata, diff, origin, cds->ttl, mctx);
@@ -1962,7 +1962,7 @@ dns_dnssec_syncupdate(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *rmkeys,
                             !exists(cdnskey, &cdnskeyrdata)))
                        {
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                                       DNS_LOGCATEGORY_GENERAL,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                        "CDNSKEY for key %s is now published",
                                        keystr);
@@ -1990,8 +1990,7 @@ dns_dnssec_syncupdate(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *rmkeys,
 
                        if (dns_rdataset_isassociated(cdnskey)) {
                                if (exists(cdnskey, &cdnskeyrdata)) {
-                                       isc_log_write(dns_lctx,
-                                                     DNS_LOGCATEGORY_GENERAL,
+                                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                                      DNS_LOGMODULE_DNSSEC,
                                                      ISC_LOG_INFO,
                                                      "CDNSKEY for key %s is "
@@ -2037,7 +2036,7 @@ dns_dnssec_syncupdate(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *rmkeys,
                if (dns_rdataset_isassociated(cdnskey)) {
                        if (exists(cdnskey, &cdnskeyrdata)) {
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                                       DNS_LOGCATEGORY_GENERAL,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                        "CDNSKEY for key %s is now deleted",
                                        keystr);
@@ -2080,7 +2079,7 @@ dns_dnssec_syncdelete(dns_rdataset_t *cds, dns_rdataset_t *cdnskey,
                if (!dns_rdataset_isassociated(cds) ||
                    !exists(cds, &cds_delete))
                {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                      "CDS (DELETE) for zone %s is now "
                                      "published",
@@ -2090,7 +2089,7 @@ dns_dnssec_syncdelete(dns_rdataset_t *cds, dns_rdataset_t *cdnskey,
        } else {
                if (dns_rdataset_isassociated(cds) && exists(cds, &cds_delete))
                {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                      "CDS (DELETE) for zone %s is now "
                                      "deleted",
@@ -2103,7 +2102,7 @@ dns_dnssec_syncdelete(dns_rdataset_t *cds, dns_rdataset_t *cdnskey,
                if (!dns_rdataset_isassociated(cdnskey) ||
                    !exists(cdnskey, &cdnskey_delete))
                {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                      "CDNSKEY (DELETE) for zone %s is now "
                                      "published",
@@ -2114,7 +2113,7 @@ dns_dnssec_syncdelete(dns_rdataset_t *cds, dns_rdataset_t *cdnskey,
                if (dns_rdataset_isassociated(cdnskey) &&
                    exists(cdnskey, &cdnskey_delete))
                {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                      "CDNSKEY (DELETE) for zone %s is now "
                                      "deleted",
@@ -2236,7 +2235,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                                RETERR(publish_key(diff, key1, origin, ttl,
                                                   mctx, report));
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                        "DNSKEY %s (%s) is now published",
                                        keystr1,
@@ -2245,7 +2244,6 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                                if (key1->hint_sign || key1->force_sign) {
                                        key1->first_sign = true;
                                        isc_log_write(
-                                               dns_lctx,
                                                DNS_LOGCATEGORY_DNSSEC,
                                                DNS_LOGMODULE_DNSSEC,
                                                ISC_LOG_INFO,
@@ -2276,7 +2274,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                        if (removed != NULL) {
                                ISC_LIST_APPEND(*removed, key2, link);
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                        "DNSKEY %s (%s) is now deleted",
                                        keystr2,
@@ -2299,7 +2297,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                        if (removed != NULL) {
                                ISC_LIST_APPEND(*removed, key2, link);
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                        "DNSKEY %s (%s) is now revoked; "
                                        "new ID is %05d",
@@ -2332,7 +2330,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                        {
                                key2->first_sign = true;
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                        "DNSKEY %s (%s) is now active", keystr1,
                                        key1->ksk ? (key1->zsk ? "CSK" : "KSK")
@@ -2341,7 +2339,7 @@ dns_dnssec_updatekeys(dns_dnsseckeylist_t *keys, dns_dnsseckeylist_t *newkeys,
                                   !key1->force_sign)
                        {
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                        "DNSKEY %s (%s) is now inactive",
                                        keystr1,
index bc0be5fe6a4ef8e9cb7dd749ff44de7ded9e50d4..03298860ad9fc1175121f0e5bf97df6ab8064f68 100644 (file)
@@ -153,7 +153,7 @@ dns_dt_create(isc_mem_t *mctx, dns_dtmode_t mode, const char *path,
        REQUIRE(envp != NULL && *envp == NULL);
        REQUIRE(foptp != NULL && *foptp != NULL);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
+       isc_log_write(DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
                      ISC_LOG_INFO, "opening dnstap destination '%s'", path);
 
        atomic_fetch_add_release(&global_generation, 1);
@@ -204,8 +204,8 @@ dns_dt_create(isc_mem_t *mctx, dns_dtmode_t mode, const char *path,
 
        env->iothr = fstrm_iothr_init(*foptp, &fw);
        if (env->iothr == NULL) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSTAP,
-                             DNS_LOGMODULE_DNSTAP, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
+                             ISC_LOG_WARNING,
                              "unable to initialize dnstap I/O thread");
                fstrm_writer_destroy(&fw);
                CHECK(ISC_R_FAILURE);
@@ -324,7 +324,7 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) {
        /*
         * We are committed here.
         */
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
+       isc_log_write(DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
                      ISC_LOG_INFO, "%s dnstap destination '%s'",
                      (roll < 0) ? "reopening" : "rolling", env->path);
 
@@ -357,8 +357,8 @@ dns_dt_reopen(dns_dtenv_t *env, int roll) {
 
        env->iothr = fstrm_iothr_init(env->fopt, &fw);
        if (env->iothr == NULL) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSTAP,
-                             DNS_LOGMODULE_DNSTAP, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
+                             ISC_LOG_WARNING,
                              "unable to initialize dnstap I/O thread");
                CHECK(ISC_R_FAILURE);
        }
@@ -474,7 +474,7 @@ dns_dt_getstats(dns_dtenv_t *env, isc_stats_t **statsp) {
 
 static void
 destroy(dns_dtenv_t *env) {
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
+       isc_log_write(DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
                      ISC_LOG_INFO, "closing dnstap");
        env->magic = 0;
 
@@ -815,9 +815,9 @@ dns_dt_send(dns_view_t *view, dns_dtmsgtype_t msgtype, isc_sockaddr_t *qaddr,
                dm.m.has_query_time_nsec = 1;
                break;
        default:
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSTAP,
-                             DNS_LOGMODULE_DNSTAP, ISC_LOG_ERROR,
-                             "invalid dnstap message type %d", msgtype);
+               isc_log_write(DNS_LOGCATEGORY_DNSTAP, DNS_LOGMODULE_DNSTAP,
+                             ISC_LOG_ERROR, "invalid dnstap message type %d",
+                             msgtype);
                return;
        }
 
index 0778d907956882958755185761797c700ac3c305..414e9aff03b67371e3d6ae8aa5ced87eff48ec8a 100644 (file)
@@ -620,8 +620,8 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
                int level;
 
                level = ISC_LOG_WARNING;
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_DNSSEC, level,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_DNSSEC,
+                             level,
                              "Permissions on the file %s "
                              "have changed from 0%o to 0600 as "
                              "a result of this operation.",
index f5090fc6f57e8fed4c86729308e1126ddbc9e3fd..43d37a0699c0f5db29b5adb5f27d699a59e3644b 100644 (file)
@@ -94,8 +94,8 @@ load_symbol(uv_lib_t *handle, const char *filename, const char *symbol_name,
                if (errmsg == NULL) {
                        errmsg = "returned function pointer is NULL";
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
+                             ISC_LOG_ERROR,
                              "failed to lookup symbol %s in "
                              "DynDB module '%s': %s",
                              symbol_name, filename, errmsg);
@@ -121,7 +121,7 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname,
 
        REQUIRE(impp != NULL && *impp == NULL);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
                      ISC_LOG_INFO, "loading DynDB instance '%s' driver '%s'",
                      instname, filename);
 
@@ -140,8 +140,8 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname,
                if (errmsg == NULL) {
                        errmsg = "unknown error";
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
+                             ISC_LOG_ERROR,
                              "failed to dlopen() DynDB instance '%s' driver "
                              "'%s': %s",
                              instname, filename, errmsg);
@@ -155,8 +155,8 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname,
        if (version < (DNS_DYNDB_VERSION - DNS_DYNDB_AGE) ||
            version > DNS_DYNDB_VERSION)
        {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
+                             ISC_LOG_ERROR,
                              "driver API version mismatch: %d/%d", version,
                              DNS_DYNDB_VERSION);
                CHECK(ISC_R_FAILURE);
@@ -172,7 +172,7 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname,
        return (ISC_R_SUCCESS);
 
 cleanup:
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
                      ISC_LOG_ERROR,
                      "failed to dynamically load DynDB instance '%s' driver "
                      "'%s': %s",
@@ -250,9 +250,9 @@ dns_dyndb_cleanup(bool exiting) {
        while (elem != NULL) {
                prev = PREV(elem, link);
                UNLINK(dyndb_implementations, elem, link);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DYNDB, ISC_LOG_INFO,
-                             "unloading DynDB instance '%s'", elem->name);
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
+                             ISC_LOG_INFO, "unloading DynDB instance '%s'",
+                             elem->name);
                elem->destroy_func(&elem->inst);
                ENSURE(elem->inst == NULL);
                unload_library(&elem);
@@ -266,9 +266,9 @@ dns_dyndb_cleanup(bool exiting) {
 }
 
 isc_result_t
-dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, isc_log_t *lctx,
-                   dns_view_t *view, dns_zonemgr_t *zmgr,
-                   isc_loopmgr_t *loopmgr, dns_dyndbctx_t **dctxp) {
+dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, dns_view_t *view,
+                   dns_zonemgr_t *zmgr, isc_loopmgr_t *loopmgr,
+                   dns_dyndbctx_t **dctxp) {
        dns_dyndbctx_t *dctx;
 
        REQUIRE(dctxp != NULL && *dctxp == NULL);
@@ -277,7 +277,6 @@ dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, isc_log_t *lctx,
        *dctx = (dns_dyndbctx_t){
                .loopmgr = loopmgr,
                .hashinit = hashinit,
-               .lctx = lctx,
        };
 
        if (view != NULL) {
@@ -313,7 +312,6 @@ dns_dyndb_destroyctx(dns_dyndbctx_t **dctxp) {
                dns_zonemgr_detach(&dctx->zmgr);
        }
        dctx->loopmgr = NULL;
-       dctx->lctx = NULL;
 
        isc_mem_putanddetach(&dctx->mctx, dctx, sizeof(*dctx));
 }
index f1f98fd0bb059c03111e3dad4aa946a8a3f247db..91b90c84f682a89498540d9bd8e26543900f8a15 100644 (file)
@@ -959,7 +959,7 @@ gss_log(int level, const char *fmt, ...) {
        va_list ap;
 
        va_start(ap, fmt);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_TKEY,
+       isc_log_vwrite(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_TKEY,
                       ISC_LOG_DEBUG(level), fmt, ap);
        va_end(ap);
 }
index 4361fb73bf4533cc20febdcbdb552765ad1c4476..355b96005341c68a19e8fae38ecefac08d94c2b2 100644 (file)
                isc_result_t result;                                           \
                result = hmac_parse(ISC_MD_##alg, key, lexer, pub);            \
                if (result == ISC_R_SUCCESS && file != NULL) {                 \
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,       \
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,                 \
                                      DNS_LOGMODULE_CRYPTO, ISC_LOG_WARNING,   \
                                      "%s: Use of K* file pairs for HMAC is "  \
                                      "deprecated\n",                          \
index 82026d154eb4f9d7c7371521e96428b314a31e61..7c481d4a973a678c4207fcb88e348030a4f9cced 100644 (file)
@@ -36,7 +36,6 @@ struct dns_dyndbctx {
        unsigned int   magic;
        const void    *hashinit;
        isc_mem_t     *mctx;
-       isc_log_t     *lctx;
        dns_view_t    *view;
        dns_zonemgr_t *zmgr;
        isc_loopmgr_t *loopmgr;
@@ -131,9 +130,9 @@ dns_dyndb_cleanup(bool exiting);
  */
 
 isc_result_t
-dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, isc_log_t *lctx,
-                   dns_view_t *view, dns_zonemgr_t *zmgr,
-                   isc_loopmgr_t *loopmgr, dns_dyndbctx_t **dctxp);
+dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, dns_view_t *view,
+                   dns_zonemgr_t *zmgr, isc_loopmgr_t *loopmgr,
+                   dns_dyndbctx_t **dctxp);
 /*%
  * Create a dyndb initialization context structure, with
  * pointers to structures in the server that the dyndb module will
index 97e0ac00cc585cfefbbdefb7c9e2591b148dc3d2..8913147330ae1edfb2f07ecf476fae3100437326 100644 (file)
@@ -19,7 +19,6 @@
 #include <isc/lang.h>
 #include <isc/log.h>
 
-extern isc_log_t       *dns_lctx;
 extern isc_logcategory_t dns_categories[];
 extern isc_logmodule_t  dns_modules[];
 
@@ -85,7 +84,7 @@ extern isc_logmodule_t         dns_modules[];
 ISC_LANG_BEGINDECLS
 
 void
-dns_log_init(isc_log_t *lctx);
+dns_log_init(void);
 /*%
  * Make the libdns categories and modules available for use with the
  * ISC logging library.
index 90770fd8f047b45e0c288d610d0514f2bebc48a5..cf1c1e9ba4c63f836e37290949268c563989fe1b 100644 (file)
@@ -365,9 +365,8 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp);
  */
 
 void
-dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
-                     isc_logcategory_t *category, isc_logmodule_t *module,
-                     int level, bool duplicateok);
+dns_resolver_logfetch(dns_fetch_t *fetch, isc_logcategory_t *category,
+                     isc_logmodule_t *module, int level, bool duplicateok);
 /*%<
  * Dump a log message on internal state at the completion of given 'fetch'.
  * 'lctx', 'category', 'module', and 'level' are used to write the log message.
index 0d7b4a7904b2a8a20bab2012503e996adba699cb..e41df8d8e2bc96a61a7eb8bc437102345a4c4630 100644 (file)
  * Miscellaneous utilities.
  */
 
-#define JOURNAL_COMMON_LOGARGS \
-       dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL
-
-#define JOURNAL_DEBUG_LOGARGS(n) JOURNAL_COMMON_LOGARGS, ISC_LOG_DEBUG(n)
-
 /*%
  * It would be non-sensical (or at least obtuse) to use FAIL() with an
  * ISC_R_SUCCESS code, but the test is there to keep the Solaris compiler
@@ -417,8 +412,8 @@ journal_seek(dns_journal_t *j, uint32_t offset) {
 
        result = isc_stdio_seek(j->fp, (off_t)offset, SEEK_SET);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: seek: %s", j->filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: seek: %s", j->filename,
                              isc_result_totext(result));
                return (ISC_R_UNEXPECTED);
        }
@@ -435,8 +430,8 @@ journal_read(dns_journal_t *j, void *mem, size_t nbytes) {
                if (result == ISC_R_EOF) {
                        return (ISC_R_NOMORE);
                }
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: read: %s", j->filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: read: %s", j->filename,
                              isc_result_totext(result));
                return (ISC_R_UNEXPECTED);
        }
@@ -450,8 +445,8 @@ journal_write(dns_journal_t *j, void *mem, size_t nbytes) {
 
        result = isc_stdio_write(mem, 1, nbytes, j->fp, NULL);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: write: %s", j->filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: write: %s", j->filename,
                              isc_result_totext(result));
                return (ISC_R_UNEXPECTED);
        }
@@ -465,15 +460,15 @@ journal_fsync(dns_journal_t *j) {
 
        result = isc_stdio_flush(j->fp);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: flush: %s", j->filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: flush: %s", j->filename,
                              isc_result_totext(result));
                return (ISC_R_UNEXPECTED);
        }
        result = isc_stdio_sync(j->fp);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: fsync: %s", j->filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: fsync: %s", j->filename,
                              isc_result_totext(result));
                return (ISC_R_UNEXPECTED);
        }
@@ -573,8 +568,8 @@ journal_file_create(isc_mem_t *mctx, bool downgrade, const char *filename) {
 
        result = isc_stdio_open(filename, "wb", &fp);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: create: %s", filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: create: %s", filename,
                              isc_result_totext(result));
                return (ISC_R_UNEXPECTED);
        }
@@ -595,8 +590,8 @@ journal_file_create(isc_mem_t *mctx, bool downgrade, const char *filename) {
 
        result = isc_stdio_write(mem, 1, (size_t)size, fp, NULL);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: write: %s", filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: write: %s", filename,
                              isc_result_totext(result));
                (void)isc_stdio_close(fp);
                (void)isc_file_remove(filename);
@@ -607,8 +602,8 @@ journal_file_create(isc_mem_t *mctx, bool downgrade, const char *filename) {
 
        result = isc_stdio_close(fp);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: close: %s", filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: close: %s", filename,
                              isc_result_totext(result));
                (void)isc_file_remove(filename);
                return (ISC_R_UNEXPECTED);
@@ -636,7 +631,8 @@ journal_open(isc_mem_t *mctx, const char *filename, bool writable, bool create,
        result = isc_stdio_open(j->filename, writable ? "rb+" : "rb", &fp);
        if (result == ISC_R_FILENOTFOUND) {
                if (create) {
-                       isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_DEBUG(1),
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_DEBUG(1),
                                      "journal file %s does not exist, "
                                      "creating it",
                                      j->filename);
@@ -650,8 +646,8 @@ journal_open(isc_mem_t *mctx, const char *filename, bool writable, bool create,
                }
        }
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: open: %s", j->filename,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: open: %s", j->filename,
                              isc_result_totext(result));
                FAIL(ISC_R_UNEXPECTED);
        }
@@ -689,7 +685,8 @@ journal_open(isc_mem_t *mctx, const char *filename, bool writable, bool create,
                 */
                j->header_ver1 = false;
        } else {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "%s: journal format not recognized", j->filename);
                FAIL(ISC_R_UNEXPECTED);
        }
@@ -870,7 +867,8 @@ maybe_fixup_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr, uint32_t serial,
                if (j->xhdr_version == XHDR_VERSION1 && xhdr->serial1 == serial)
                {
                        isc_log_write(
-                               JOURNAL_COMMON_LOGARGS, ISC_LOG_DEBUG(3),
+                               DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                               ISC_LOG_DEBUG(3),
                                "%s: XHDR_VERSION1 -> XHDR_VERSION2 at %u",
                                j->filename, serial);
                        j->xhdr_version = XHDR_VERSION2;
@@ -881,7 +879,8 @@ maybe_fixup_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr, uint32_t serial,
                           xhdr->count == serial)
                {
                        isc_log_write(
-                               JOURNAL_COMMON_LOGARGS, ISC_LOG_DEBUG(3),
+                               DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                               ISC_LOG_DEBUG(3),
                                "%s: XHDR_VERSION2 -> XHDR_VERSION1 at %u",
                                j->filename, serial);
                        j->xhdr_version = XHDR_VERSION1;
@@ -901,7 +900,8 @@ maybe_fixup_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr, uint32_t serial,
                if (value != 0L) {
                        CHECK(journal_seek(j, offset + 12));
                } else {
-                       isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_DEBUG(3),
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_DEBUG(3),
                                      "%s: XHDR_VERSION1 count zero at %u",
                                      j->filename, serial);
                        j->xhdr_version = XHDR_VERSION2;
@@ -911,7 +911,8 @@ maybe_fixup_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr, uint32_t serial,
                   xhdr->serial1 == 0U &&
                   isc_serial_gt(xhdr->serial0, xhdr->count))
        {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_DEBUG(3),
                              "%s: XHDR_VERSION2 count zero at %u", j->filename,
                              serial);
                xhdr->serial1 = xhdr->serial0;
@@ -976,7 +977,8 @@ journal_next(dns_journal_t *j, journal_pos_t *pos) {
        if (xhdr.serial0 != pos->serial ||
            isc_serial_le(xhdr.serial1, xhdr.serial0))
        {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "%s: journal file corrupt: "
                              "expected serial %u, got %u",
                              j->filename, pos->serial, xhdr.serial0);
@@ -991,8 +993,9 @@ journal_next(dns_journal_t *j, journal_pos_t *pos) {
                          : sizeof(journal_rawxhdr_ver1_t);
 
        if ((off_t)(pos->offset + hdrsize + xhdr.size) < pos->offset) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "%s: offset too large", j->filename);
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "%s: offset too large",
+                             j->filename);
                return (ISC_R_UNEXPECTED);
        }
 
@@ -1198,7 +1201,8 @@ dns_journal_writediff(dns_journal_t *j, dns_diff_t *diff) {
        REQUIRE(DNS_DIFF_VALID(diff));
        REQUIRE(j->state == JOURNAL_STATE_TRANSACTION);
 
-       isc_log_write(JOURNAL_DEBUG_LOGARGS(3), "writing to journal");
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                     ISC_LOG_DEBUG(3), "writing to journal");
        (void)dns_diff_print(diff, NULL);
 
        /*
@@ -1222,7 +1226,8 @@ dns_journal_writediff(dns_journal_t *j, dns_diff_t *diff) {
        }
 
        if (size >= DNS_JOURNAL_SIZE_MAX) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "dns_journal_writediff: %s: journal entry "
                              "too big to be stored: %" PRIu64 " bytes",
                              j->filename, size);
@@ -1306,13 +1311,15 @@ dns_journal_commit(dns_journal_t *j) {
         * Perform some basic consistency checks.
         */
        if (j->x.n_soa != 2) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "%s: malformed transaction: %d SOAs", j->filename,
                              j->x.n_soa);
                return (ISC_R_UNEXPECTED);
        }
        if (!DNS_SERIAL_GT(j->x.pos[1].serial, j->x.pos[0].serial)) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "%s: malformed transaction: serial number "
                              "did not increase",
                              j->filename);
@@ -1320,7 +1327,8 @@ dns_journal_commit(dns_journal_t *j) {
        }
        if (!JOURNAL_EMPTY(&j->header)) {
                if (j->x.pos[0].serial != j->header.end.serial) {
-                       isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_ERROR,
                                      "malformed transaction: "
                                      "%s last serial %u != "
                                      "transaction first serial %u",
@@ -1335,7 +1343,8 @@ dns_journal_commit(dns_journal_t *j) {
         */
        total = j->x.pos[1].offset - j->x.pos[0].offset;
        if (total >= DNS_JOURNAL_SIZE_MAX) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "transaction too big to be stored in journal: "
                              "%" PRIu64 "b (max is %" PRIu64 "b)",
                              total, (uint64_t)DNS_JOURNAL_SIZE_MAX);
@@ -1561,7 +1570,8 @@ dns_journal_rollforward(dns_journal_t *j, dns_db_t *db, unsigned int options) {
                        n_soa = 1;
                }
                if (n_soa == 0) {
-                       isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_ERROR,
                                      "%s: journal file corrupt: missing "
                                      "initial SOA",
                                      j->filename);
@@ -1578,7 +1588,8 @@ dns_journal_rollforward(dns_journal_t *j, dns_db_t *db, unsigned int options) {
                dns_diff_append(&diff, &tuple);
 
                if (++n_put > 100) {
-                       isc_log_write(JOURNAL_DEBUG_LOGARGS(3),
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_DEBUG(3),
                                      "%s: applying diff to database (%u)",
                                      j->filename, db_serial);
                        (void)dns_diff_print(&diff, NULL);
@@ -1593,7 +1604,8 @@ dns_journal_rollforward(dns_journal_t *j, dns_db_t *db, unsigned int options) {
        CHECK(result);
 
        if (n_put != 0) {
-               isc_log_write(JOURNAL_DEBUG_LOGARGS(3),
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_DEBUG(3),
                              "%s: applying final diff to database (%u)",
                              j->filename, db_serial);
                (void)dns_diff_print(&diff, NULL);
@@ -1639,11 +1651,12 @@ dns_journal_print(isc_mem_t *mctx, uint32_t flags, const char *filename,
 
        result = dns_journal_open(mctx, filename, DNS_JOURNAL_READ, &j);
        if (result == ISC_R_NOTFOUND) {
-               isc_log_write(JOURNAL_DEBUG_LOGARGS(3), "no journal file");
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_DEBUG(3), "no journal file");
                return (DNS_R_NOJOURNAL);
        } else if (result != ISC_R_SUCCESS) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "journal open failure: %s: %s",
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR, "journal open failure: %s: %s",
                              isc_result_totext(result), filename);
                return (result);
        }
@@ -1703,7 +1716,8 @@ dns_journal_print(isc_mem_t *mctx, uint32_t flags, const char *filename,
                        }
                }
                if (n_soa == 0) {
-                       isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_ERROR,
                                      "%s: journal file corrupt: missing "
                                      "initial SOA",
                                      j->filename);
@@ -1752,8 +1766,9 @@ dns_journal_print(isc_mem_t *mctx, uint32_t flags, const char *filename,
        goto cleanup;
 
 failure:
-       isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
-                     "%s: cannot print: journal file corrupt", j->filename);
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                     ISC_LOG_ERROR, "%s: cannot print: journal file corrupt",
+                     j->filename);
 
 cleanup:
        if (source.base != NULL) {
@@ -1957,7 +1972,8 @@ read_one_rr(dns_journal_t *j) {
        dns_journal_t save = *j;
 
        if (j->offset > j->it.epos.offset) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "%s: journal corrupt: possible integer overflow",
                              j->filename);
                return (ISC_R_UNEXPECTED);
@@ -1972,7 +1988,8 @@ read_one_rr(dns_journal_t *j) {
                 */
                CHECK(journal_read_xhdr(j, &xhdr));
                if (xhdr.size == 0) {
-                       isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_ERROR,
                                      "%s: journal corrupt: empty transaction",
                                      j->filename);
                        FAIL(ISC_R_UNEXPECTED);
@@ -1986,7 +2003,8 @@ read_one_rr(dns_journal_t *j) {
                if (xhdr.serial0 != j->it.current_serial ||
                    isc_serial_le(xhdr.serial1, xhdr.serial0))
                {
-                       isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_ERROR,
                                      "%s: journal file corrupt: "
                                      "expected serial %u, got %u",
                                      j->filename, j->it.current_serial,
@@ -2009,7 +2027,8 @@ read_one_rr(dns_journal_t *j) {
         * size owner name, well below 70 k total.
         */
        if (rrhdr.size < 1 + 10 || rrhdr.size > 70000) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "%s: journal corrupt: impossible RR size "
                              "(%d bytes)",
                              j->filename, rrhdr.size);
@@ -2051,7 +2070,8 @@ read_one_rr(dns_journal_t *j) {
        rdlen = isc_buffer_getuint16(&j->it.source);
 
        if (rdlen > DNS_RDATA_MAXLENGTH) {
-               isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_JOURNAL,
+                             ISC_LOG_ERROR,
                              "%s: journal corrupt: impossible rdlen "
                              "(%u bytes)",
                              j->filename, rdlen);
@@ -2400,7 +2420,9 @@ dns_db_diffx(dns_diff_t *diff, dns_db_t *dba, dns_dbversion_t *dbvera,
 
        if (journal != NULL) {
                if (ISC_LIST_EMPTY(diff->tuples)) {
-                       isc_log_write(JOURNAL_DEBUG_LOGARGS(3), "no changes");
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                     DNS_LOGMODULE_JOURNAL, ISC_LOG_DEBUG(3),
+                                     "no changes");
                } else {
                        CHECK(dns_journal_write_transaction(journal, diff));
                }
@@ -2629,7 +2651,8 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial,
 
                        size = xhdr.size;
                        if (size > len) {
-                               isc_log_write(JOURNAL_COMMON_LOGARGS,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
+                                             DNS_LOGMODULE_JOURNAL,
                                              ISC_LOG_ERROR,
                                              "%s: journal file corrupt, "
                                              "transaction too large",
@@ -2663,7 +2686,8 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial,
                                size = xhdr.size;
                                if (size > len) {
                                        isc_log_write(
-                                               JOURNAL_COMMON_LOGARGS,
+                                               DNS_LOGCATEGORY_GENERAL,
+                                               DNS_LOGMODULE_JOURNAL,
                                                ISC_LOG_ERROR,
                                                "%s: journal file corrupt, "
                                                "transaction too large",
index 0d25db5d3f09b5d29ba76e9767713ce29417a87d..baabe2dbba77833ea9150a99c625c9905b8160ee 100644 (file)
                        dst_key_setstate((key), (state), (target));            \
                        dst_key_settime((key), (timing), time);                \
                                                                                \
-                       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {    \
+                       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {              \
                                dst_key_format((key), keystr, sizeof(keystr)); \
                                isc_log_write(                                 \
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,      \
+                                       DNS_LOGCATEGORY_DNSSEC,                \
                                        DNS_LOGMODULE_DNSSEC,                  \
                                        ISC_LOG_DEBUG(3),                      \
                                        "keymgr: DNSKEY %s (%s) initialize "   \
@@ -90,10 +90,9 @@ static void
 log_key_overflow(dst_key_t *key, const char *what) {
        char keystr[DST_KEY_FORMATSIZE];
        dst_key_format(key, keystr, sizeof(keystr));
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
-                     ISC_LOG_WARNING,
-                     "keymgr: DNSKEY %s (%s) calculation overflowed", keystr,
-                     what);
+       isc_log_write(
+               DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
+               "keymgr: DNSKEY %s (%s) calculation overflowed", keystr, what);
 }
 
 /*
@@ -382,7 +381,7 @@ keymgr_key_retire(dns_dnsseckey_t *key, dns_kasp_t *kasp, isc_stdtime_t now) {
        }
 
        dst_key_format(key->key, keystr, sizeof(keystr));
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+       isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
                      ISC_LOG_INFO, "keymgr: retire DNSKEY %s (%s)", keystr,
                      keymgr_keyrole(key->key));
 }
@@ -491,7 +490,7 @@ keymgr_createkey(dns_kasp_key_t *kkey, const dns_name_t *origin,
                }
                if (conflict) {
                        /* Try again. */
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
                                      "keymgr: key collision id %d",
                                      dst_key_id(newkey));
@@ -1216,7 +1215,7 @@ keymgr_transition_allowed(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key,
                          int type, dst_key_state_t next_state,
                          bool secure_to_insecure) {
        /* Debug logging. */
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                bool rule1a, rule1b, rule2a, rule2b, rule3a, rule3b;
                char keystr[DST_KEY_FORMATSIZE];
                dst_key_format(key->key, keystr, sizeof(keystr));
@@ -1229,7 +1228,7 @@ keymgr_transition_allowed(dns_dnsseckeylist_t *keyring, dns_dnsseckey_t *key,
                rule3a = keymgr_have_rrsig(keyring, key, type, NA);
                rule3b = keymgr_have_rrsig(keyring, key, type, next_state);
                isc_log_write(
-                       dns_lctx, DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                       DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
                        ISC_LOG_DEBUG(1),
                        "keymgr: dnssec evaluation of %s %s record %s: "
                        "rule1=(~%s or %s) rule2=(~%s or %s) "
@@ -1470,7 +1469,7 @@ transition:
                                continue;
                        }
 
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                      "keymgr: examine %s %s type %s "
                                      "in state %s",
@@ -1485,7 +1484,7 @@ transition:
                                 * No change needed, continue with the next
                                 * record type.
                                 */
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                               isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                              DNS_LOGMODULE_DNSSEC,
                                              ISC_LOG_DEBUG(1),
                                              "keymgr: %s %s type %s in "
@@ -1496,7 +1495,7 @@ transition:
                                continue;
                        }
 
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                      "keymgr: can we transition %s %s type %s "
                                      "state %s to state %s?",
@@ -1510,7 +1509,7 @@ transition:
                        {
                                /* No, please respect rollover methods. */
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                        "keymgr: policy says no to %s %s type "
                                        "%s "
@@ -1529,7 +1528,7 @@ transition:
                        {
                                /* No, this would make the zone bogus. */
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                        "keymgr: dnssec says no to %s %s type "
                                        "%s "
@@ -1547,7 +1546,7 @@ transition:
                        if (when > now) {
                                /* Not yet. */
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                        "keymgr: time says no to %s %s type %s "
                                        "state %s to state %s (wait %u "
@@ -1562,7 +1561,7 @@ transition:
                                continue;
                        }
 
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                      "keymgr: transition %s %s type %s "
                                      "state %s to state %s!",
@@ -1716,11 +1715,11 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key,
 
        /* Do we need to create a successor for the active key? */
        if (active_key != NULL) {
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                        dst_key_format(active_key->key, keystr, sizeof(keystr));
                        isc_log_write(
-                               dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                               DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
+                               DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                               ISC_LOG_DEBUG(1),
                                "keymgr: DNSKEY %s (%s) is active in policy %s",
                                keystr, keymgr_keyrole(active_key->key),
                                dns_kasp_getname(kasp));
@@ -1733,11 +1732,11 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key,
                prepub = keymgr_prepublication_time(active_key, kasp, lifetime,
                                                    now);
                if (prepub > now) {
-                       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+                       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                                dst_key_format(active_key->key, keystr,
                                               sizeof(keystr));
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                        "keymgr: new successor needed for "
                                        "DNSKEY %s (%s) (policy %s) in %u "
@@ -1756,11 +1755,11 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key,
 
                if (keymgr_key_has_successor(active_key, keyring)) {
                        /* Key already has successor. */
-                       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+                       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                                dst_key_format(active_key->key, keystr,
                                               sizeof(keystr));
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                                       DNS_LOGCATEGORY_DNSSEC,
                                        DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                        "keymgr: key DNSKEY %s (%s) (policy "
                                        "%s) already has successor",
@@ -1770,9 +1769,9 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key,
                        return (ISC_R_SUCCESS);
                }
 
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                        dst_key_format(active_key->key, keystr, sizeof(keystr));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                      "keymgr: need successor for DNSKEY %s "
                                      "(%s) (policy %s)",
@@ -1785,7 +1784,7 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key,
                 */
                if (!rollover) {
                        dst_key_format(active_key->key, keystr, sizeof(keystr));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
                                      "keymgr: DNSKEY %s (%s) is offline in "
                                      "policy %s, cannot start rollover",
@@ -1793,11 +1792,11 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key,
                                      dns_kasp_getname(kasp));
                        return (ISC_R_SUCCESS);
                }
-       } else if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+       } else if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                char namestr[DNS_NAME_FORMATSIZE];
                dns_name_format(origin, namestr, sizeof(namestr));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_DEBUG(1),
                              "keymgr: no active key found for %s (policy %s)",
                              namestr, dns_kasp_getname(kasp));
        }
@@ -1912,7 +1911,7 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key,
 
        /* Logging. */
        dst_key_format(new_key->key, keystr, sizeof(keystr));
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+       isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
                      ISC_LOG_INFO, "keymgr: DNSKEY %s (%s) %s for policy %s",
                      keystr, keymgr_keyrole(new_key->key),
                      (candidate != NULL) ? "selected" : "created",
@@ -1988,8 +1987,8 @@ keymgr_purge_keyfile(dst_key_t *key, int type) {
        if (ret != ISC_R_SUCCESS) {
                char keystr[DST_KEY_FORMATSIZE];
                dst_key_format(key, keystr, sizeof(keystr));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_WARNING,
                              "keymgr: failed to purge DNSKEY %s (%s): cannot "
                              "build filename (%s)",
                              keystr, keymgr_keyrole(key),
@@ -2000,8 +1999,8 @@ keymgr_purge_keyfile(dst_key_t *key, int type) {
        if (unlink(filename) < 0) {
                char keystr[DST_KEY_FORMATSIZE];
                dst_key_format(key, keystr, sizeof(keystr));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_WARNING,
                              "keymgr: failed to purge DNSKEY %s (%s): unlink "
                              "'%s' failed",
                              keystr, keymgr_keyrole(key), filename);
@@ -2036,11 +2035,11 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass,
        *nexttime = 0;
 
        /* Debug logging: what keys are available in the keyring? */
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                if (ISC_LIST_EMPTY(*keyring)) {
                        char namebuf[DNS_NAME_FORMATSIZE];
                        dns_name_format(origin, namebuf, sizeof(namebuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                      "keymgr: keyring empty (zone %s policy "
                                      "%s)",
@@ -2051,7 +2050,7 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass,
                     dkey != NULL; dkey = ISC_LIST_NEXT(dkey, link))
                {
                        dst_key_format(dkey->key, keystr, sizeof(keystr));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                      "keymgr: keyring: %s (policy %s)", keystr,
                                      dns_kasp_getname(kasp));
@@ -2060,7 +2059,7 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass,
                     dkey != NULL; dkey = ISC_LIST_NEXT(dkey, link))
                {
                        dst_key_format(dkey->key, keystr, sizeof(keystr));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(1),
                                      "keymgr: dnskeys: %s (policy %s)", keystr,
                                      dns_kasp_getname(kasp));
@@ -2100,7 +2099,7 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass,
                                             dns_kasp_purgekeys(kasp), now))
                {
                        dst_key_format(dkey->key, keystr, sizeof(keystr));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_INFO,
                                      "keymgr: purge DNSKEY %s (%s) according "
                                      "to policy %s",
@@ -2130,7 +2129,7 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass,
                                /* Found a match. */
                                dst_key_format(dkey->key, keystr,
                                               sizeof(keystr));
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                               isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                              DNS_LOGMODULE_DNSSEC,
                                              ISC_LOG_DEBUG(1),
                                              "keymgr: DNSKEY %s (%s) matches "
@@ -2193,7 +2192,6 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass,
                                        dst_key_format(dnskey->key, keystr,
                                                       sizeof(keystr));
                                        isc_log_write(
-                                               dns_lctx,
                                                DNS_LOGCATEGORY_DNSSEC,
                                                DNS_LOGMODULE_DNSSEC,
                                                ISC_LOG_DEBUG(1),
@@ -2249,11 +2247,11 @@ dns_keymgr_run(const dns_name_t *origin, dns_rdataclass_t rdclass,
                        RETERR(dst_key_tofile(dkey->key, options, directory));
                        dst_key_setmodified(dkey->key, false);
 
-                       if (!isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+                       if (!isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                                continue;
                        }
                        dst_key_format(dkey->key, keystr, sizeof(keystr));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(3),
                                      "keymgr: DNSKEY %s (%s) "
                                      "saved to directory %s, policy %s",
@@ -2275,12 +2273,11 @@ failure:
                }
        }
 
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                char namebuf[DNS_NAME_FORMATSIZE];
                dns_name_format(origin, namebuf, sizeof(namebuf));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_DEBUG(3),
-                             "keymgr: %s done", namebuf);
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_DEBUG(3), "keymgr: %s done", namebuf);
        }
        return (result);
 }
@@ -2343,14 +2340,14 @@ keymgr_checkds(dns_kasp_t *kasp, dns_dnsseckeylist_t *keyring,
                }
        }
 
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_NOTICE)) {
+       if (isc_log_wouldlog(ISC_LOG_NOTICE)) {
                char keystr[DST_KEY_FORMATSIZE];
                char timestr[26]; /* Minimal buf as per ctime_r() spec. */
 
                dst_key_format(ksk_key->key, keystr, sizeof(keystr));
                isc_stdtime_tostring(when, timestr, sizeof(timestr));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_NOTICE,
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_NOTICE,
                              "keymgr: checkds DS for key %s seen %s at %s",
                              keystr, dspublish ? "published" : "withdrawn",
                              timestr);
index c714606a13bb92e6b25fbf560c34ab70b83b81d1..1d895bc350f16df7b1974397cff9e7f6bc48f2ef 100644 (file)
@@ -217,8 +217,8 @@ dns_keystore_keygen(dns_keystore_t *keystore, const dns_name_t *origin,
                        char namebuf[DNS_NAME_FORMATSIZE];
                        dns_name_format(origin, namebuf, sizeof(namebuf));
                        isc_log_write(
-                               dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                               DNS_LOGMODULE_DNSSEC, ISC_LOG_ERROR,
+                               DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                               ISC_LOG_ERROR,
                                "keystore: failed to create PKCS#11 object "
                                "for zone %s, policy %s: %s",
                                namebuf, policy, isc_result_totext(result));
@@ -232,15 +232,15 @@ dns_keystore_keygen(dns_keystore_t *keystore, const dns_name_t *origin,
 
                if (result != ISC_R_SUCCESS) {
                        isc_log_write(
-                               dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                               DNS_LOGMODULE_DNSSEC, ISC_LOG_ERROR,
+                               DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                               ISC_LOG_ERROR,
                                "keystore: failed to generate PKCS#11 object "
                                "%s: %s",
                                label, isc_result_totext(result));
                        return (result);
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_DNSSEC, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_DNSSEC,
+                             ISC_LOG_ERROR,
                              "keystore: generated PKCS#11 object %s", label);
        } else {
                result = dst_key_generate(origin, alg, size, 0, flags,
index 6eed43ec06a8d7eab7c6141473396542b3eac886..3e31ab195cc6748c22183ac5b4dc9bbedc6cf4af 100644 (file)
@@ -53,10 +53,8 @@ isc_logmodule_t dns_modules[] = {
        { "dns/qp", 0 },         { NULL, 0 },
 };
 
-isc_log_t *dns_lctx = NULL;
-
 void
-dns_log_init(isc_log_t *lctx) {
-       isc_log_registercategories(lctx, dns_categories);
-       isc_log_registermodules(lctx, dns_modules);
+dns_log_init(void) {
+       isc_log_registercategories(dns_categories);
+       isc_log_registermodules(dns_modules);
 }
index 849c00150c0bfeb99c7955082cc37b6736a20869..aff2290db60bf423a763a5d154d86115ec47a599 100644 (file)
@@ -1448,12 +1448,12 @@ flushandsync(FILE *f, isc_result_t result, const char *temp) {
        }
        if (result != ISC_R_SUCCESS && logit) {
                if (temp != NULL) {
-                       isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
+                       isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
                                      "dumping to master file: %s: flush: %s",
                                      temp, isc_result_totext(result));
                } else {
-                       isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
+                       isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
                                      "dumping to stream: flush: %s",
                                      isc_result_totext(result));
@@ -1466,12 +1466,12 @@ flushandsync(FILE *f, isc_result_t result, const char *temp) {
        }
        if (result != ISC_R_SUCCESS && logit) {
                if (temp != NULL) {
-                       isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
+                       isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
                                      "dumping to master file: %s: fsync: %s",
                                      temp, isc_result_totext(result));
                } else {
-                       isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
+                       isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
                                      "dumping to stream: fsync: %s",
                                      isc_result_totext(result));
@@ -1496,8 +1496,8 @@ closeandrename(FILE *f, isc_result_t result, const char *temp,
                result = tresult;
        }
        if (result != ISC_R_SUCCESS && logit) {
-               isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
+               isc_log_write(ISC_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTERDUMP,
+                             ISC_LOG_ERROR,
                              "dumping master file: %s: fclose: %s", temp,
                              isc_result_totext(result));
                logit = false;
@@ -1508,8 +1508,8 @@ closeandrename(FILE *f, isc_result_t result, const char *temp,
                (void)isc_file_remove(temp);
        }
        if (result != ISC_R_SUCCESS && logit) {
-               isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
+               isc_log_write(ISC_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTERDUMP,
+                             ISC_LOG_ERROR,
                              "dumping master file: rename: %s: %s", file,
                              isc_result_totext(result));
        }
@@ -1852,8 +1852,8 @@ opentmp(isc_mem_t *mctx, const char *file, char **tempp, FILE **fp) {
 
        result = isc_file_openunique(tempname, &f);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTERDUMP, ISC_LOG_ERROR,
+               isc_log_write(ISC_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTERDUMP,
+                             ISC_LOG_ERROR,
                              "dumping master file: %s: open: %s", tempname,
                              isc_result_totext(result));
                goto cleanup;
index c00d54bffd9d49e31ce73c70082677907ea3e210..222db0f7ca5559776a5553e8f13501b5f23f49c3 100644 (file)
@@ -1843,8 +1843,8 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
 
        isc_buffer_remainingregion(source, &r);
        if (r.length != 0) {
-               isc_log_write(dns_lctx, ISC_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MESSAGE, ISC_LOG_DEBUG(3),
+               isc_log_write(ISC_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MESSAGE,
+                             ISC_LOG_DEBUG(3),
                              "message has %u byte(s) of trailing garbage",
                              r.length);
        }
@@ -4695,7 +4695,7 @@ logfmtpacket(dns_message_t *message, const char *description,
        int len = 1024;
        isc_result_t result;
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -4718,9 +4718,8 @@ logfmtpacket(dns_message_t *message, const char *description,
                        isc_mem_put(mctx, buf, len);
                        len += 1024;
                } else if (result == ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, category, module, level,
-                                     "%s%s%s%s%.*s", description, space,
-                                     addrbuf, newline,
+                       isc_log_write(category, module, level, "%s%s%s%s%.*s",
+                                     description, space, addrbuf, newline,
                                      (int)isc_buffer_usedlength(&buffer), buf);
                }
        } while (result == ISC_R_NOSPACE);
index ab04bb736fb0da0cb7ec9dc28d5abf2a112286f3..e977146a545d028b76ce753c080f4b8d4ce13727 100644 (file)
@@ -385,9 +385,8 @@ delete_expired(void *arg) {
        {
                char nb[DNS_NAME_FORMATSIZE];
                dns_name_format(&nta->name, nb, sizeof(nb));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_NTA, ISC_LOG_INFO,
-                             "deleting expired NTA at %s", nb);
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_NTA,
+                             ISC_LOG_INFO, "deleting expired NTA at %s", nb);
                dns_qp_deletename(qp, &nta->name, NULL, NULL);
                dns__nta_shutdown(nta);
                dns__nta_unref(nta);
@@ -584,12 +583,12 @@ dns__nta_shutdown_cb(void *arg) {
 
        REQUIRE(VALID_NTA(nta));
 
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                char nb[DNS_NAME_FORMATSIZE];
                dns_name_format(&nta->name, nb, sizeof(nb));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_NTA, ISC_LOG_DEBUG(3),
-                             "shutting down NTA %p at %s", nta, nb);
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_NTA,
+                             ISC_LOG_DEBUG(3), "shutting down NTA %p at %s",
+                             nta, nb);
        }
        if (nta->timer) {
                isc_timer_stop(nta->timer);
index 882c2166497dbdf8da90e65c6daa9111672ba6e8..3c454868b07ba7de00c16fab23a1b4756ab48de9 100644 (file)
@@ -69,8 +69,8 @@ static atomic_uint_fast64_t rollback_time;
 #define PRItime " %" PRIu64 " ns "
 
 #if DNS_QP_LOG_STATS
-#define LOG_STATS(...)                                                      \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_QP, \
+#define LOG_STATS(...)                                            \
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_QP, \
                      ISC_LOG_DEBUG(1), __VA_ARGS__)
 #else
 #define LOG_STATS(...)
@@ -83,8 +83,8 @@ static atomic_uint_fast64_t rollback_time;
  */
 #define TRACE(fmt, ...)                                                        \
        do {                                                                   \
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(7))) {            \
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,      \
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(7))) {                      \
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,                \
                                      DNS_LOGMODULE_QP, ISC_LOG_DEBUG(7),      \
                                      "%s:%d:%s(qp %p uctx \"%s\"):t%u: " fmt, \
                                      __FILE__, __LINE__, __func__, qp,        \
@@ -998,7 +998,7 @@ squash_twigs(dns_qp_t *qp, dns_qpref_t twigs, dns_qpweight_t size) {
                 * letting compact+recycle fail repeatedly.
                 */
                if (QP_AUTOGC(qp)) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_QP, ISC_LOG_NOTICE,
                                      "qp %p uctx \"%s\" compact/recycle "
                                      "failed to recover any space, "
index ca7a17029f859ee691909ed3e8cc72497693a91c..d7b23800cdf0dbfc415c6110ed083ed05aa8cca6 100644 (file)
@@ -571,11 +571,11 @@ static void
 delete_node(qpcache_t *qpdb, qpcnode_t *node) {
        isc_result_t result = ISC_R_UNEXPECTED;
 
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                char printname[DNS_NAME_FORMATSIZE];
                dns_name_format(&node->name, printname, sizeof(printname));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
+                             ISC_LOG_DEBUG(1),
                              "delete_node(): %p %s (bucket %d)", node,
                              printname, node->locknum);
        }
@@ -588,7 +588,7 @@ delete_node(qpcache_t *qpdb, qpcnode_t *node) {
                 */
                result = dns_qp_deletename(qpdb->nsec, &node->name, NULL, NULL);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_WARNING,
                                      "delete_node(): "
                                      "dns_qp_deletename: %s",
@@ -603,8 +603,8 @@ delete_node(qpcache_t *qpdb, qpcnode_t *node) {
                break;
        }
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_CACHE, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
+                             ISC_LOG_WARNING,
                              "delete_node(): "
                              "dns_qp_deletename: %s",
                              isc_result_totext(result));
@@ -2487,9 +2487,8 @@ free_qpdb(qpcache_t *qpdb, bool log) {
                } else {
                        strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
-                             "done free_qpdb(%s)", buf);
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
+                             ISC_LOG_DEBUG(1), "done free_qpdb(%s)", buf);
        }
        if (dns_name_dynamic(&qpdb->common.origin)) {
                dns_name_free(&qpdb->common.origin, qpdb->common.mctx);
@@ -2595,7 +2594,7 @@ qpdb_destroy(dns_db_t *arg) {
                        } else {
                                strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                        }
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
                                      "calling free_qpdb(%s)", buf);
                        free_qpdb(qpdb, true);
@@ -2780,7 +2779,7 @@ detachnode(dns_db_t *db, dns_dbnode_t **targetp DNS__DB_FLARG) {
                        } else {
                                strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                        }
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
                                      "calling free_qpdb(%s)", buf);
                        free_qpdb(qpdb, true);
index 27d077a65aa9403fb4647538a4161e1aa97eebf9..2bf4ab2a2d4c3f3fe6ff593ff59243d0cd83f49a 100644 (file)
@@ -456,9 +456,8 @@ free_qpdb(qpzonedb_t *qpdb, bool log) {
                } else {
                        strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_DB, ISC_LOG_DEBUG(1),
-                             "called free_qpdb(%s)", buf);
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DB,
+                             ISC_LOG_DEBUG(1), "called free_qpdb(%s)", buf);
        }
 
        call_rcu(&qpdb->rcu_head, free_db_rcu);
@@ -518,7 +517,7 @@ qpdb_destroy(dns_db_t *arg) {
                        } else {
                                strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                        }
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_DB, ISC_LOG_DEBUG(1),
                                      "calling free_qpdb(%s)", buf);
                        free_qpdb(qpdb, true);
@@ -2960,7 +2959,7 @@ previous_closest_nsec(dns_rdatatype_t type, qpz_search_t *search,
                 * nodes in the auxiliary tree that are awaiting deletion.
                 */
                if (result != DNS_R_PARTIALMATCH && result != ISC_R_NOTFOUND) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_DB, ISC_LOG_ERROR,
                                      "previous_closest_nsec(): %s",
                                      isc_result_totext(result));
@@ -3882,7 +3881,7 @@ detachnode(dns_db_t *db, dns_dbnode_t **targetp DNS__DB_FLARG) {
                        } else {
                                strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                        }
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_DB, ISC_LOG_DEBUG(1),
                                      "calling free_qpdb(%s)", buf);
                        free_qpdb(qpdb, true);
index 8a34f76673771b9d8cdcde33f8481c496ede9f20..67e23aaf1a3d1b0ce2c41ccfd9c17929fdd5e93e 100644 (file)
@@ -772,7 +772,7 @@ previous_closest_nsec(dns_rdatatype_t type, rbtdb_search_t *search,
                 * nodes in the auxiliary tree that are awaiting deletion.
                 */
                if (result != DNS_R_PARTIALMATCH && result != ISC_R_NOTFOUND) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_ERROR,
                                      "previous_closest_nsec(): %s",
                                      isc_result_totext(result));
@@ -1644,8 +1644,8 @@ loadnode(dns_rbtdb_t *rbtdb, const dns_name_t *name, dns_rbtnode_t **nodep,
 
        if (nsecresult == ISC_R_EXISTS) {
 #if 1 /* 0 */
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_CACHE, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
+                             ISC_LOG_WARNING,
                              "addnode: NSEC node already exists");
 #endif /* if 1 */
                node->nsec = DNS_DB_NSEC_HAS_NSEC;
@@ -1658,7 +1658,7 @@ loadnode(dns_rbtdb_t *rbtdb, const dns_name_t *name, dns_rbtnode_t **nodep,
                 */
                tmpresult = dns_rbt_deletenode(rbtdb->tree, node, false);
                if (tmpresult != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_WARNING,
                                      "loading_addrdataset: "
                                      "dns_rbt_deletenode: %s after "
index 314fb3facadcad745d45377070bc68c6c00de664..5b971178b4158f3b806a98deb28a1b8c940cd5b7 100644 (file)
@@ -434,8 +434,8 @@ adjust_quantum(unsigned int old, isc_time_t *start) {
        nodes = (nodes + old * 3) / 4;
 
        if (nodes != old) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
+                             ISC_LOG_DEBUG(1),
                              "adjust_quantum: old=%d, new=%d", old, nodes);
        }
 
@@ -525,9 +525,8 @@ free_rbtdb(dns_rbtdb_t *rbtdb, bool log) {
                } else {
                        strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
-                             "done free_rbtdb(%s)", buf);
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
+                             ISC_LOG_DEBUG(1), "done free_rbtdb(%s)", buf);
        }
        if (dns_name_dynamic(&rbtdb->common.origin)) {
                dns_name_free(&rbtdb->common.origin, rbtdb->common.mctx);
@@ -654,7 +653,7 @@ dns__rbtdb_destroy(dns_db_t *arg) {
                        } else {
                                strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                        }
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
                                      "calling free_rbtdb(%s)", buf);
                        free_rbtdb(rbtdb, true);
@@ -1051,10 +1050,10 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
 
        INSIST(!ISC_LINK_LINKED(node, deadlink));
 
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                char printname[DNS_NAME_FORMATSIZE];
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
+                             ISC_LOG_DEBUG(1),
                              "delete_node(): %p %s (bucket %d)", node,
                              dns_rbt_formatnodename(node, printname,
                                                     sizeof(printname)),
@@ -1081,7 +1080,7 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
                                          NULL, DNS_RBTFIND_EMPTYDATA, NULL,
                                          NULL);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_WARNING,
                                      "delete_node: "
                                      "dns_rbt_findnode(nsec): %s",
@@ -1091,7 +1090,7 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
                                                    false);
                        if (result != ISC_R_SUCCESS) {
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                                       DNS_LOGCATEGORY_DATABASE,
                                        DNS_LOGMODULE_CACHE, ISC_LOG_WARNING,
                                        "delete_node(): "
                                        "dns_rbt_deletenode(nsecnode): %s",
@@ -1108,8 +1107,8 @@ delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) {
                break;
        }
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
-                             DNS_LOGMODULE_CACHE, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_CACHE,
+                             ISC_LOG_WARNING,
                              "delete_node(): "
                              "dns_rbt_deletenode: %s",
                              isc_result_totext(result));
@@ -2300,7 +2299,7 @@ dns__rbtdb_detachnode(dns_db_t *db, dns_dbnode_t **targetp DNS__DB_FLARG) {
                        } else {
                                strlcpy(buf, "<UNKNOWN>", sizeof(buf));
                        }
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+                       isc_log_write(DNS_LOGCATEGORY_DATABASE,
                                      DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
                                      "calling free_rbtdb(%s)", buf);
                        free_rbtdb(rbtdb, true);
index 400cfe04f503cd77bd3e296ec4960499f74b726c..352df5b0e6e2cf5d8ed8627f8bf3ca3f753d0e88 100644 (file)
@@ -1055,7 +1055,7 @@ req_log(int level, const char *fmt, ...) {
        va_list ap;
 
        va_start(ap, fmt);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_REQUEST,
-                      level, fmt, ap);
+       isc_log_vwrite(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_REQUEST, level,
+                      fmt, ap);
        va_end(ap);
 }
index dd944f867094ccd1800a7299e2ccbafb7d6e6d0a..9e052799e53c6dd61884114a0adca2d98bc79f07 100644 (file)
 #include <dns/zone.h>
 
 #ifdef WANT_QUERYTRACE
-#define RTRACE(m)                                                             \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,                     \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), "res %p: %s", \
-                     res, (m))
-#define RRTRACE(r, m)                                                         \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,                     \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), "res %p: %s", \
-                     (r), (m))
-#define FCTXTRACE(m)                                            \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,       \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), \
-                     "fctx %p(%s): %s", fctx, fctx->info, (m))
-#define FCTXTRACE2(m1, m2)                                      \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,       \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), \
-                     "fctx %p(%s): %s %s", fctx, fctx->info, (m1), (m2))
-#define FCTXTRACE3(m, res)                                              \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,               \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),         \
-                     "fctx %p(%s): [result: %s] %s", fctx, fctx->info, \
-                     isc_result_totext(res), (m))
+#define RTRACE(m)                                                       \
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER, \
+                     ISC_LOG_DEBUG(3), "res %p: %s", res, (m))
+#define RRTRACE(r, m)                                                   \
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER, \
+                     ISC_LOG_DEBUG(3), "res %p: %s", (r), (m))
+#define FCTXTRACE(m)                                                         \
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,      \
+                     ISC_LOG_DEBUG(3), "fctx %p(%s): %s", fctx, fctx->info, \
+                     (m))
+#define FCTXTRACE2(m1, m2)                                              \
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER, \
+                     ISC_LOG_DEBUG(3), "fctx %p(%s): %s %s", fctx,     \
+                     fctx->info, (m1), (m2))
+#define FCTXTRACE3(m, res)                                                    \
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,       \
+                     ISC_LOG_DEBUG(3), "fctx %p(%s): [result: %s] %s", fctx, \
+                     fctx->info, isc_result_totext(res), (m))
 #define FCTXTRACE4(m1, m2, res)                                            \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,                  \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),            \
-                     "fctx %p(%s): [result: %s] %s %s", fctx, fctx->info, \
-                     isc_result_totext(res), (m1), (m2))
-#define FCTXTRACE5(m1, m2, v)                                               \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,                   \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),             \
-                     "fctx %p(%s): %s %s%u", fctx, fctx->info, (m1), (m2), \
-                     (v))
-#define FTRACE(m)                                                          \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,                  \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),            \
-                     "fetch %p (fctx %p(%s)): %s", fetch, fetch->private, \
-                     fetch->private->info, (m))
-#define QTRACE(m)                                                          \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,                  \
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),            \
-                     "resquery %p (fctx %p(%s)): %s", query, query->fctx, \
-                     query->fctx->info, (m))
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,    \
+                     ISC_LOG_DEBUG(3), "fctx %p(%s): [result: %s] %s %s", \
+                     fctx, fctx->info, isc_result_totext(res), (m1), (m2))
+#define FCTXTRACE5(m1, m2, v)                                           \
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER, \
+                     ISC_LOG_DEBUG(3), "fctx %p(%s): %s %s%u", fctx,   \
+                     fctx->info, (m1), (m2), (v))
+#define FTRACE(m)                                                            \
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,      \
+                     ISC_LOG_DEBUG(3), "fetch %p (fctx %p(%s)): %s", fetch, \
+                     fetch->private, fetch->private->info, (m))
+#define QTRACE(m)                                                        \
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,  \
+                     ISC_LOG_DEBUG(3), "resquery %p (fctx %p(%s)): %s", \
+                     query, query->fctx, query->fctx->info, (m))
 #else /* ifdef WANT_QUERYTRACE */
 #define RTRACE(m)          \
        do {               \
@@ -1378,7 +1371,7 @@ fcount_logspill(fetchctx_t *fctx, fctxcount_t *counter, bool final) {
        char dbuf[DNS_NAME_FORMATSIZE];
        isc_stdtime_t now;
 
-       if (!isc_log_wouldlog(dns_lctx, ISC_LOG_INFO)) {
+       if (!isc_log_wouldlog(ISC_LOG_INFO)) {
                return;
        }
 
@@ -1396,8 +1389,8 @@ fcount_logspill(fetchctx_t *fctx, fctxcount_t *counter, bool final) {
        dns_name_format(fctx->domain, dbuf, sizeof(dbuf));
 
        if (!final) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_SPILL,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_SPILL, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_INFO,
                              "too many simultaneous fetches for %s "
                              "(allowed %" PRIuFAST32 " spilled %" PRIuFAST32
                              "; %s)",
@@ -1406,8 +1399,8 @@ fcount_logspill(fetchctx_t *fctx, fctxcount_t *counter, bool final) {
                                                    : "cumulative since "
                                                      "initial trigger event");
        } else {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_SPILL,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_SPILL, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_INFO,
                              "fetch counters for %s now being discarded "
                              "(allowed %" PRIuFAST32 " spilled %" PRIuFAST32
                              "; cumulative since initial trigger event)",
@@ -1644,7 +1637,7 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result) {
                }
                UNLOCK(&fctx->res->lock);
                if (logit) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                       isc_log_write(DNS_LOGCATEGORY_RESOLVER,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
                                      "clients-per-query increased to %u",
                                      new_spillat);
@@ -1686,7 +1679,7 @@ fctx__done(fetchctx_t *fctx, isc_result_t result, const char *func,
 
        if (result == ISC_R_SUCCESS) {
                if (fctx->qmin_warning != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_LAME_SERVERS,
+                       isc_log_write(DNS_LOGCATEGORY_LAME_SERVERS,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
                                      "success resolving '%s' after disabling "
                                      "qname minimization due to '%s'",
@@ -1997,7 +1990,7 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
                        /* format new address */
                        isc_sockaddr_format(&sockaddr, sockaddrbuf2,
                                            sizeof(sockaddrbuf2));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                       isc_log_write(DNS_LOGCATEGORY_RESOLVER,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),
                                      "Using DNS64 address %s to talk to %s\n",
                                      sockaddrbuf2, sockaddrbuf1);
@@ -2133,14 +2126,14 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
        if (result != ISC_R_SUCCESS && (query->options & DNS_FETCHOPT_TCP) != 0)
        {
                int log_level = ISC_LOG_NOTICE;
-               if (isc_log_wouldlog(dns_lctx, log_level)) {
+               if (isc_log_wouldlog(log_level)) {
                        char peerbuf[ISC_SOCKADDR_FORMATSIZE];
 
                        isc_sockaddr_format(&sockaddr, peerbuf,
                                            ISC_SOCKADDR_FORMATSIZE);
 
                        isc_log_write(
-                               dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                               DNS_LOGCATEGORY_RESOLVER,
                                DNS_LOGMODULE_RESOLVER, log_level,
                                "Unable to establish a connection to %s: %s\n",
                                peerbuf, isc_result_totext(result));
@@ -3118,10 +3111,10 @@ add_bad(fetchctx_t *fctx, dns_message_t *rmessage, dns_adbaddrinfo_t *addrinfo,
        dns_rdatatype_format(fctx->type, typebuf, sizeof(typebuf));
        dns_rdataclass_format(fctx->res->rdclass, classbuf, sizeof(classbuf));
        isc_sockaddr_format(address, addrbuf, sizeof(addrbuf));
-       isc_log_write(
-               dns_lctx, DNS_LOGCATEGORY_LAME_SERVERS, DNS_LOGMODULE_RESOLVER,
-               ISC_LOG_INFO, "%s%s%s resolving '%s/%s/%s': %s", code, spc,
-               isc_result_totext(reason), namebuf, typebuf, classbuf, addrbuf);
+       isc_log_write(DNS_LOGCATEGORY_LAME_SERVERS, DNS_LOGMODULE_RESOLVER,
+                     ISC_LOG_INFO, "%s%s%s resolving '%s/%s/%s': %s", code,
+                     spc, isc_result_totext(reason), namebuf, typebuf,
+                     classbuf, addrbuf);
 }
 
 /*
@@ -3273,10 +3266,10 @@ findname(fetchctx_t *fctx, const dns_name_t *name, in_port_t port,
                                    NULL, res->view->dstport, fctx->depth + 1,
                                    fctx->qc, &find);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),
-                     "fctx %p(%s): createfind for %s - %s", fctx, fctx->info,
-                     fctx->clientstr, isc_result_totext(result));
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                     ISC_LOG_DEBUG(3), "fctx %p(%s): createfind for %s - %s",
+                     fctx, fctx->info, fctx->clientstr,
+                     isc_result_totext(result));
 
        if (result != ISC_R_SUCCESS) {
                if (result == DNS_R_ALIAS) {
@@ -3288,7 +3281,7 @@ findname(fetchctx_t *fctx, const dns_name_t *name, in_port_t port,
                        dns_adb_destroyfind(&find);
                        fctx->adberr++;
                        dns_name_format(name, namebuf, sizeof(namebuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_CNAME,
+                       isc_log_write(DNS_LOGCATEGORY_CNAME,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
                                      "skipping nameserver '%s' because it "
                                      "is a CNAME, while resolving '%s'",
@@ -3333,9 +3326,9 @@ findname(fetchctx_t *fctx, const dns_name_t *name, in_port_t port,
         */
        if (waiting_for(find, fctx->type) && dns_name_equal(name, fctx->name)) {
                fctx->adberr++;
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
-                             "loop detected resolving '%s'", fctx->info);
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_INFO, "loop detected resolving '%s'",
+                             fctx->info);
 
                if ((find->options & DNS_ADBFIND_WANTEVENT) != 0) {
                        atomic_fetch_add_relaxed(&fctx->pending, 1);
@@ -3437,8 +3430,8 @@ fctx_getaddresses(fetchctx_t *fctx, bool badcache) {
        res = fctx->res;
 
        if (fctx->depth > res->maxdepth) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_DEBUG(3),
                              "too much NS indirection resolving '%s' "
                              "(depth=%u, maxdepth=%u)",
                              fctx->info, fctx->depth, res->maxdepth);
@@ -3794,7 +3787,7 @@ possibly_mark(fetchctx_t *fctx, dns_adbaddrinfo_t *addr) {
                return;
        }
 
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                char buf[ISC_NETADDR_FORMATSIZE];
                isc_netaddr_fromsockaddr(&na, sa);
                isc_netaddr_format(&na, buf, sizeof(buf));
@@ -3983,8 +3976,8 @@ fctx_try(fetchctx_t *fctx, bool retrying, bool badcache) {
 
        /* We've already exceeded maximum query count */
        if (isc_counter_used(fctx->qc) > res->maxqueries) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_DEBUG(3),
                              "exceeded max queries resolving '%s' "
                              "(querycount=%u, maxqueries=%u)",
                              fctx->info, isc_counter_used(fctx->qc),
@@ -4057,7 +4050,7 @@ fctx_try(fetchctx_t *fctx, bool retrying, bool badcache) {
                        dns_rdatatype_format(fctx->qmintype, typebuf,
                                             sizeof(typebuf));
 
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                       isc_log_write(DNS_LOGCATEGORY_RESOLVER,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_ERROR,
                                      "fctx %p(%s): attempting QNAME "
                                      "minimization fetch for %s/%s but "
@@ -4097,8 +4090,8 @@ fctx_try(fetchctx_t *fctx, bool retrying, bool badcache) {
 
        result = isc_counter_increment(fctx->qc);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_DEBUG(3),
                              "exceeded max queries resolving '%s'",
                              fctx->info);
                goto done;
@@ -4219,8 +4212,8 @@ resume_qmin(void *arg) {
                break;
 
        default:
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(5),
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_DEBUG(5),
                              "QNAME minimization: unexpected result %s",
                              isc_result_totext(result));
                break;
@@ -4356,8 +4349,8 @@ fctx_expired(void *arg) {
        REQUIRE(VALID_FCTX(fctx));
        REQUIRE(fctx->tid == isc_tid());
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                     ISC_LOG_INFO,
                      "shut down hung fetch while resolving %p(%s)", fctx,
                      fctx->info);
        fctx_done_detach(&fctx, DNS_R_SERVFAIL);
@@ -4472,8 +4465,8 @@ log_ns_ttl(fetchctx_t *fctx, const char *where) {
 
        dns_name_format(fctx->name, namebuf, sizeof(namebuf));
        dns_name_format(fctx->domain, domainbuf, sizeof(domainbuf));
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(10),
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                     ISC_LOG_DEBUG(10),
                      "log_ns_ttl: fctx %p: %s: %s (in '%s'?): %u %u", fctx,
                      where, namebuf, domainbuf, fctx->ns_ttl_ok, fctx->ns_ttl);
 }
@@ -4534,8 +4527,8 @@ fctx_create(dns_resolver_t *res, isc_loop_t *loop, const dns_name_t *name,
 
        if (qc != NULL) {
                isc_counter_attach(qc, &fctx->qc);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(9),
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_DEBUG(9),
                              "fctx %p(%s): attached to counter %p (%d)", fctx,
                              fctx->info, fctx->qc, isc_counter_used(fctx->qc));
        } else {
@@ -4544,8 +4537,8 @@ fctx_create(dns_resolver_t *res, isc_loop_t *loop, const dns_name_t *name,
                if (result != ISC_R_SUCCESS) {
                        goto cleanup_fetch;
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(9),
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_DEBUG(9),
                              "fctx %p(%s): created counter %p", fctx,
                              fctx->info, fctx->qc);
        }
@@ -4826,10 +4819,9 @@ log_lame(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo) {
        dns_name_format(fctx->name, namebuf, sizeof(namebuf));
        dns_name_format(fctx->domain, domainbuf, sizeof(domainbuf));
        isc_sockaddr_format(&addrinfo->sockaddr, addrbuf, sizeof(addrbuf));
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_LAME_SERVERS,
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
-                     "lame server resolving '%s' (in '%s'?): %s", namebuf,
-                     domainbuf, addrbuf);
+       isc_log_write(DNS_LOGCATEGORY_LAME_SERVERS, DNS_LOGMODULE_RESOLVER,
+                     ISC_LOG_INFO, "lame server resolving '%s' (in '%s'?): %s",
+                     namebuf, domainbuf, addrbuf);
 }
 
 static void
@@ -4844,8 +4836,8 @@ log_formerr(fetchctx_t *fctx, const char *format, ...) {
 
        isc_sockaddr_format(&fctx->addrinfo->sockaddr, nsbuf, sizeof(nsbuf));
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                     ISC_LOG_NOTICE,
                      "DNS format error from %s resolving %s for %s: %s", nsbuf,
                      fctx->info, fctx->clientstr, msgbuf);
 }
@@ -5643,9 +5635,8 @@ fctx_log(void *arg, int level, const char *fmt, ...) {
        vsnprintf(msgbuf, sizeof(msgbuf), fmt, args);
        va_end(args);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                     DNS_LOGMODULE_RESOLVER, level, "fctx %p(%s): %s", fctx,
-                     fctx->info, msgbuf);
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER, level,
+                     "fctx %p(%s): %s", fctx, fctx->info, msgbuf);
 }
 
 static isc_result_t
@@ -5891,7 +5882,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_message_t *message,
                                             sizeof(typebuf));
                        dns_rdataclass_format(rdataset->rdclass, classbuf,
                                              sizeof(classbuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                       isc_log_write(DNS_LOGCATEGORY_RESOLVER,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
                                      "check-names %s %s/%s/%s",
                                      fail ? "failure" : "warning", namebuf,
@@ -6802,7 +6793,7 @@ is_answeraddress_allowed(dns_view_t *view, dns_name_t *name,
                                             sizeof(typebuf));
                        dns_rdataclass_format(rdataset->rdclass, classbuf,
                                              sizeof(classbuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                       isc_log_write(DNS_LOGCATEGORY_RESOLVER,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
                                      "answer address %s denied for %s/%s/%s",
                                      addrbuf, namebuf, typebuf, classbuf);
@@ -6912,10 +6903,9 @@ is_answertarget_allowed(fetchctx_t *fctx, dns_name_t *qname, dns_name_t *rname,
                dns_rdatatype_format(rdataset->type, typebuf, sizeof(typebuf));
                dns_rdataclass_format(view->rdclass, classbuf,
                                      sizeof(classbuf));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
-                             "%s target %s denied for %s/%s", typebuf,
-                             tnamebuf, qnamebuf, classbuf);
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_NOTICE, "%s target %s denied for %s/%s",
+                             typebuf, tnamebuf, qnamebuf, classbuf);
                return (false);
        }
 
@@ -6933,8 +6923,8 @@ trim_ns_ttl(fetchctx_t *fctx, dns_name_t *name, dns_rdataset_t *rdataset) {
                dns_name_format(fctx->name, namebuf, sizeof(namebuf));
                dns_rdatatype_format(fctx->type, tbuf, sizeof(tbuf));
 
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(10),
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_DEBUG(10),
                              "fctx %p: trimming ttl of %s/NS for %s/%s: "
                              "%u -> %u",
                              fctx, ns_namebuf, namebuf, tbuf, rdataset->ttl,
@@ -7240,9 +7230,8 @@ log_nsid(isc_buffer_t *opt, size_t nsid_len, resquery_t *query, int level,
 
        isc_sockaddr_format(&query->addrinfo->sockaddr, addrbuf,
                            sizeof(addrbuf));
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_NSID, DNS_LOGMODULE_RESOLVER,
-                     level, "received NSID %s (\"%s\") from %s", buf, pbuf,
-                     addrbuf);
+       isc_log_write(DNS_LOGCATEGORY_NSID, DNS_LOGMODULE_RESOLVER, level,
+                     "received NSID %s (\"%s\") from %s", buf, pbuf, addrbuf);
 
        isc_mem_put(mctx, pbuf, nsid_len + 1);
        isc_mem_put(mctx, buf, buflen);
@@ -7406,11 +7395,11 @@ resquery_response(isc_result_t eresult, isc_region_t *region, void *arg) {
                 * keep listening for a good answer.
                 */
                rctx->nextitem = true;
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_INFO)) {
+               if (isc_log_wouldlog(ISC_LOG_INFO)) {
                        char addrbuf[ISC_SOCKADDR_FORMATSIZE];
                        isc_sockaddr_format(&query->addrinfo->sockaddr, addrbuf,
                                            sizeof(addrbuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
+                       isc_log_write(DNS_LOGCATEGORY_RESOLVER,
                                      DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
                                      "bad cookie from %s", addrbuf);
                }
@@ -7513,16 +7502,16 @@ resquery_response_continue(void *arg, isc_result_t result) {
                if (dns_adb_getcookie(query->addrinfo, NULL, 0) >
                    CLIENT_COOKIE_SIZE)
                {
-                       if (isc_log_wouldlog(dns_lctx, ISC_LOG_INFO)) {
+                       if (isc_log_wouldlog(ISC_LOG_INFO)) {
                                char addrbuf[ISC_SOCKADDR_FORMATSIZE];
                                isc_sockaddr_format(&query->addrinfo->sockaddr,
                                                    addrbuf, sizeof(addrbuf));
-                               isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                                       DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
-                                       "missing expected cookie "
-                                       "from %s",
-                                       addrbuf);
+                               isc_log_write(DNS_LOGCATEGORY_RESOLVER,
+                                             DNS_LOGMODULE_RESOLVER,
+                                             ISC_LOG_INFO,
+                                             "missing expected cookie "
+                                             "from %s",
+                                             addrbuf);
                        }
                        rctx->retryopts |= DNS_FETCHOPT_TCP;
                        rctx->resend = true;
@@ -7540,9 +7529,7 @@ resquery_response_continue(void *arg, isc_result_t result) {
                                result = dns_peer_getrequirecookie(peer,
                                                                   &required);
                                if (result == ISC_R_SUCCESS && required) {
-                                       if (isc_log_wouldlog(dns_lctx,
-                                                            ISC_LOG_INFO))
-                                       {
+                                       if (isc_log_wouldlog(ISC_LOG_INFO)) {
                                                char addrbuf
                                                        [ISC_SOCKADDR_FORMATSIZE];
                                                isc_sockaddr_format(
@@ -7551,7 +7538,6 @@ resquery_response_continue(void *arg, isc_result_t result) {
                                                        addrbuf,
                                                        sizeof(addrbuf));
                                                isc_log_write(
-                                                       dns_lctx,
                                                        DNS_LOGCATEGORY_RESOLVER,
                                                        DNS_LOGMODULE_RESOLVER,
                                                        ISC_LOG_INFO,
@@ -9957,8 +9943,8 @@ spillattimer_countdown(void *arg) {
        }
        UNLOCK(&res->lock);
        if (spillat > 0) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                             DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
+               isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                             ISC_LOG_NOTICE,
                              "clients-per-query decreased to %u", spillat);
        }
 }
@@ -10072,8 +10058,7 @@ prime_done(void *arg) {
 
        int level = (resp->result == ISC_R_SUCCESS) ? ISC_LOG_DEBUG(1)
                                                    : ISC_LOG_NOTICE;
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                     DNS_LOGMODULE_RESOLVER, level,
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER, level,
                      "resolver priming query complete: %s",
                      isc_result_totext(resp->result));
 
@@ -10221,16 +10206,15 @@ log_fetch(const dns_name_t *name, dns_rdatatype_t type) {
         * If there's no chance of logging it, don't render (format) the
         * name and RDATA type (further below), and return early.
         */
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
        dns_name_format(name, namebuf, sizeof(namebuf));
        dns_rdatatype_format(type, typebuf, sizeof(typebuf));
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                     DNS_LOGMODULE_RESOLVER, level, "fetch: %s/%s", namebuf,
-                     typebuf);
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER, level,
+                     "fetch: %s/%s", namebuf, typebuf);
 }
 
 static void
@@ -10330,8 +10314,8 @@ fctx_minimize_qname(fetchctx_t *fctx) {
 
        char domainbuf[DNS_NAME_FORMATSIZE];
        dns_name_format(fctx->qminname, domainbuf, sizeof(domainbuf));
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
-                     DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(5),
+       isc_log_write(DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
+                     ISC_LOG_DEBUG(5),
                      "QNAME minimization - %s minimized, qmintype %d "
                      "qminname %s",
                      fctx->minimized ? "" : "not", fctx->qmintype, domainbuf);
@@ -10627,9 +10611,8 @@ dns_resolver_destroyfetch(dns_fetch_t **fetchp) {
 }
 
 void
-dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
-                     isc_logcategory_t *category, isc_logmodule_t *module,
-                     int level, bool duplicateok) {
+dns_resolver_logfetch(dns_fetch_t *fetch, isc_logcategory_t *category,
+                     isc_logmodule_t *module, int level, bool duplicateok) {
        fetchctx_t *fctx = NULL;
 
        REQUIRE(DNS_FETCH_VALID(fetch));
@@ -10641,7 +10624,7 @@ dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
        if (!fctx->logged || duplicateok) {
                char domainbuf[DNS_NAME_FORMATSIZE];
                dns_name_format(fctx->domain, domainbuf, sizeof(domainbuf));
-               isc_log_write(lctx, category, module, level,
+               isc_log_write(category, module, level,
                              "fetch completed for %s in "
                              "%" PRIu64 "."
                              "%06" PRIu64 ": %s/%s "
index f5ebb368c07d5bfe2385002b22db4c880c783de5..0ff172133fd327ab8798e4a757e31cf2cabdd7c5 100644 (file)
@@ -279,16 +279,15 @@ dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
                goto failure;
        }
        if (check_hints(db) != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
-                             "extra data in root hints '%s'",
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_HINTS,
+                             ISC_LOG_WARNING, "extra data in root hints '%s'",
                              (filename != NULL) ? filename : "<BUILT-IN>");
        }
        *target = db;
        return (ISC_R_SUCCESS);
 
 failure:
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_HINTS,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_HINTS,
                      ISC_LOG_ERROR,
                      "could not configure root hints from "
                      "'%s': %s",
@@ -326,13 +325,13 @@ report(dns_view_t *view, dns_name_t *name, bool missing, dns_rdata_t *rdata) {
        databuf[isc_buffer_usedlength(&buffer)] = '\0';
 
        if (missing) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_HINTS,
+                             ISC_LOG_WARNING,
                              "checkhints%s%s: %s/%s (%s) missing from hints",
                              sep, viewname, namebuf, typebuf, databuf);
        } else {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_HINTS,
+                             ISC_LOG_WARNING,
                              "checkhints%s%s: %s/%s (%s) extra record "
                              "in hints",
                              sep, viewname, namebuf, typebuf, databuf);
@@ -521,8 +520,8 @@ dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db) {
        result = dns_db_find(hints, dns_rootname, NULL, dns_rdatatype_ns, 0,
                             now, NULL, name, &hintns, NULL);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_HINTS,
+                             ISC_LOG_WARNING,
                              "checkhints%s%s: unable to get root NS rrset "
                              "from hints: %s",
                              sep, viewname, isc_result_totext(result));
@@ -532,8 +531,8 @@ dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db) {
        result = dns_db_find(db, dns_rootname, NULL, dns_rdatatype_ns, 0, now,
                             NULL, name, &rootns, NULL);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_HINTS,
+                             ISC_LOG_WARNING,
                              "checkhints%s%s: unable to get root NS rrset "
                              "from cache: %s",
                              sep, viewname, isc_result_totext(result));
@@ -553,7 +552,7 @@ dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db) {
                        char namebuf[DNS_NAME_FORMATSIZE];
                        /* missing from hints */
                        dns_name_format(&ns.name, namebuf, sizeof(namebuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
                                      "checkhints%s%s: unable to find root "
                                      "NS '%s' in hints",
@@ -581,7 +580,7 @@ dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db) {
                        char namebuf[DNS_NAME_FORMATSIZE];
                        /* extra entry in hints */
                        dns_name_format(&ns.name, namebuf, sizeof(namebuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
                                      "checkhints%s%s: extra NS '%s' in hints",
                                      sep, viewname, namebuf);
index 5edf8338b66ddd7f30d788d3177e6045a86ac66c..c25c9588e6331b2a6327d9324f49f0795165e597 100644 (file)
@@ -610,7 +610,7 @@ fix_qname_skip_recurse(dns_rpz_zones_t *rpzs) {
        }
 
 set:
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+       isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
                      DNS_RPZ_DEBUG_QUIET,
                      "computed RPZ qname_skip_recurse mask=0x%" PRIx64,
                      (uint64_t)mask);
@@ -719,11 +719,10 @@ badname(int level, const dns_name_t *name, const char *str1, const char *str2) {
        /*
         * bin/tests/system/rpz/tests.sh looks for "invalid rpz".
         */
-       if (level < DNS_RPZ_DEBUG_QUIET && isc_log_wouldlog(dns_lctx, level)) {
+       if (level < DNS_RPZ_DEBUG_QUIET && isc_log_wouldlog(level)) {
                char namebuf[DNS_NAME_FORMATSIZE];
                dns_name_format(name, namebuf, sizeof(namebuf));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                             DNS_LOGMODULE_RBTDB, level,
+               isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB, level,
                              "invalid rpz IP address \"%s\"%s%s", namebuf,
                              str1, str2);
        }
@@ -1012,9 +1011,7 @@ name2ipkey(int log_level, dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
        /*
         * Complain about bad names but be generous and accept them.
         */
-       if (log_level < DNS_RPZ_DEBUG_QUIET &&
-           isc_log_wouldlog(dns_lctx, log_level))
-       {
+       if (log_level < DNS_RPZ_DEBUG_QUIET && isc_log_wouldlog(log_level)) {
                /*
                 * Convert the address back to a canonical domain name
                 * to ensure that the original name is in canonical form.
@@ -1027,8 +1024,8 @@ name2ipkey(int log_level, dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
                {
                        char ip2_str[DNS_NAME_FORMATSIZE];
                        dns_name_format(ip_name2, ip2_str, sizeof(ip2_str));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                                     DNS_LOGMODULE_RBTDB, log_level,
+                       isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                                     log_level,
                                      "rpz IP address \"%s\""
                                      " is not the canonical \"%s\"",
                                      ip_str, ip2_str);
@@ -1388,8 +1385,8 @@ add_cidr(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
                 * bin/tests/system/rpz/tests.sh looks for "rpz.*failed".
                 */
                dns_name_format(src_name, namebuf, sizeof(namebuf));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                             DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
+               isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                             DNS_RPZ_ERROR_LEVEL,
                              "rpz add_cidr(%s) failed: %s", namebuf,
                              isc_result_totext(result));
                goto done;
@@ -1647,8 +1644,8 @@ dns_rpz_dbupdate_callback(dns_db_t *db, void *fn_arg) {
                rpz->updatepending = true;
 
                dns_name_format(&rpz->origin, dname, DNS_NAME_FORMATSIZE);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_DEBUG(3),
                              "rpz: %s: update already queued or running",
                              dname);
                if (rpz->dbversion != NULL) {
@@ -1693,8 +1690,8 @@ dns__rpz_timer_start(dns_rpz_zone_t *rpz) {
                char dname[DNS_NAME_FORMATSIZE];
 
                dns_name_format(&rpz->origin, dname, DNS_NAME_FORMATSIZE);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_INFO,
                              "rpz: %s: new zone version came "
                              "too soon, deferring update for "
                              "%" PRIu64 " seconds",
@@ -1744,7 +1741,7 @@ update_rpz_done_cb(void *data) {
 
        UNLOCK(&rpz->rpzs->maint_lock);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
                      ISC_LOG_INFO, "rpz: %s: reload done: %s", dname,
                      isc_result_totext(rpz->updateresult));
 
@@ -1765,8 +1762,8 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
 
        result = dns_db_createiterator(rpz->updb, DNS_DB_NONSEC3, &updbit);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "rpz: %s: failed to create DB iterator - %s",
                              domain, isc_result_totext(result));
                return (result);
@@ -1774,8 +1771,8 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
 
        result = dns_dbiterator_first(updbit);
        if (result != ISC_R_SUCCESS && result != ISC_R_NOMORE) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+                             ISC_LOG_ERROR,
                              "rpz: %s: failed to get db iterator - %s", domain,
                              isc_result_totext(result));
                goto cleanup;
@@ -1793,7 +1790,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
 
                result = dns_dbiterator_current(updbit, &node, name);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                      "rpz: %s: failed to get dbiterator - %s",
                                      domain, isc_result_totext(result));
@@ -1806,7 +1803,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
                result = dns_db_allrdatasets(rpz->updb, node, rpz->updbversion,
                                             0, 0, &rdsiter);
                if (result != ISC_R_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                      "rpz: %s: failed to fetch "
                                      "rrdatasets - %s",
@@ -1823,7 +1820,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
                if (result != ISC_R_SUCCESS) { /* skip empty non-terminal */
                        if (result != ISC_R_NOMORE) {
                                isc_log_write(
-                                       dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                                       DNS_LOGCATEGORY_GENERAL,
                                        DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                        "rpz: %s: error %s while creating "
                                        "rdatasetiter",
@@ -1838,7 +1835,7 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
                result = isc_ht_add(newnodes, name->ndata, name->length, rpz);
                if (result != ISC_R_SUCCESS) {
                        dns_name_format(name, namebuf, sizeof(namebuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                      "rpz: %s, adding node %s to HT error %s",
                                      domain, namebuf,
@@ -1865,15 +1862,15 @@ update_nodes(dns_rpz_zone_t *rpz, isc_ht_t *newnodes) {
 
                if (result != ISC_R_SUCCESS) {
                        dns_name_format(name, namebuf, sizeof(namebuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_ERROR,
                                      "rpz: %s: adding node %s "
                                      "to RPZ error %s",
                                      domain, namebuf,
                                      isc_result_totext(result));
-               } else if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+               } else if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                        dns_name_format(name, namebuf, sizeof(namebuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_MASTER, ISC_LOG_DEBUG(3),
                                      "rpz: %s: adding node %s", domain,
                                      namebuf);
@@ -2011,7 +2008,7 @@ dns__rpz_timer_cb(void *arg) {
        rpz->dbversion = NULL;
 
        dns_name_format(&rpz->origin, domain, DNS_NAME_FORMATSIZE);
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
                      ISC_LOG_INFO, "rpz: %s: reload start", domain);
 
        dns_rpz_zones_ref(rpz->rpzs);
@@ -2363,8 +2360,8 @@ del_name(dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
                         * "rpz.*failed".
                         */
                        dns_name_format(src_name, namebuf, sizeof(namebuf));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                                     DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
+                       isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                                     DNS_RPZ_ERROR_LEVEL,
                                      "rpz del_name(%s) node delete "
                                      "failed: %s",
                                      namebuf, isc_result_totext(result));
@@ -2528,9 +2525,8 @@ dns_rpz_find_ip(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
                /*
                 * bin/tests/system/rpz/tests.sh looks for "rpz.*failed".
                 */
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                             DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
-                             "rpz ip2name() failed: %s",
+               isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                             DNS_RPZ_ERROR_LEVEL, "rpz ip2name() failed: %s",
                              isc_result_totext(result));
                return (DNS_RPZ_INVALID_NUM);
        }
@@ -2592,8 +2588,8 @@ dns_rpz_find_name(dns_rpz_zones_t *rpzs, dns_rpz_type_t rpz_type,
                 * bin/tests/system/rpz/tests.sh looks for "rpz.*failed".
                 */
                dns_name_format(trig_name, namebuf, sizeof(namebuf));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RPZ,
-                             DNS_LOGMODULE_RBTDB, DNS_RPZ_ERROR_LEVEL,
+               isc_log_write(DNS_LOGCATEGORY_RPZ, DNS_LOGMODULE_RBTDB,
+                             DNS_RPZ_ERROR_LEVEL,
                              "dns_rpz_find_name(%s) failed: %s", namebuf,
                              isc_result_totext(result));
                break;
index c140cec59935eda7e55f7e23643d467e0ef88d40..fae2fe6cbb088846de011b6855072807ef0051d0 100644 (file)
@@ -101,9 +101,9 @@ hash_divisor(unsigned int initial) {
                }
        } while (pp < &primes[sizeof(primes) / sizeof(primes[0])]);
 
-       if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DEBUG3)) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
-                             DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DEBUG3,
+       if (isc_log_wouldlog(DNS_RRL_LOG_DEBUG3)) {
+               isc_log_write(DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
+                             DNS_RRL_LOG_DEBUG3,
                              "%d hash_divisor() divisions in %d tries"
                              " to get %d from %d",
                              divisions, tries, result, initial);
@@ -184,8 +184,8 @@ set_age(dns_rrl_t *rrl, dns_rrl_entry_t *e, isc_stdtime_t now) {
                }
                if (i != 0) {
                        isc_log_write(
-                               dns_lctx, DNS_LOGCATEGORY_RRL,
-                               DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DEBUG1,
+                               DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
+                               DNS_RRL_LOG_DEBUG1,
                                "rrl new time base scanned %d entries"
                                " at %d for %d %d %d %d",
                                i, now, rrl->ts_bases[ts_gen],
@@ -224,13 +224,13 @@ expand_entries(dns_rrl_t *rrl, int newsize) {
         * Log expansions so that the user can tune max-table-size
         * and min-table-size.
         */
-       if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DROP) && rrl->hash != NULL) {
+       if (isc_log_wouldlog(DNS_RRL_LOG_DROP) && rrl->hash != NULL) {
                rate = rrl->probes;
                if (rrl->searches != 0) {
                        rate /= rrl->searches;
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
-                             DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DROP,
+               isc_log_write(DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
+                             DNS_RRL_LOG_DROP,
                              "increase from %d to %d RRL entries with"
                              " %d bins; average search length %.1f",
                              rrl->num_entries, rrl->num_entries + newsize,
@@ -310,13 +310,13 @@ expand_rrl_hash(dns_rrl_t *rrl, isc_stdtime_t now) {
        rrl->hash_gen ^= 1;
        hash->gen = rrl->hash_gen;
 
-       if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DROP) && old_bins != 0) {
+       if (isc_log_wouldlog(DNS_RRL_LOG_DROP) && old_bins != 0) {
                rate = rrl->probes;
                if (rrl->searches != 0) {
                        rate /= rrl->searches;
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
-                             DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DROP,
+               isc_log_write(DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
+                             DNS_RRL_LOG_DROP,
                              "increase from %d to %d RRL bins for"
                              " %d entries; average search length %.1f",
                              old_bins, new_bins, rrl->num_entries, rate);
@@ -619,7 +619,7 @@ debit_log(const dns_rrl_entry_t *e, int age, const char *action) {
                snprintf(buf, sizeof(buf), "age=%d", age);
                age_str = buf;
        }
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
+       isc_log_write(DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
                      DNS_RRL_LOG_DEBUG3, "rrl %08x %6s  responses=%-3d %s",
                      hash_key(&e->key), age_str, e->responses, action);
 }
@@ -662,7 +662,7 @@ debit_rrl_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, double qps, double scale,
                        new_rate = 1;
                }
                if (ratep->scaled != new_rate) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
+                       isc_log_write(DNS_LOGCATEGORY_RRL,
                                      DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DEBUG1,
                                      "%d qps scaled %s by %.2f"
                                      " from %d to %d",
@@ -718,7 +718,7 @@ debit_rrl_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, double qps, double scale,
         * Debit the entry for this response.
         */
        if (--e->responses >= 0) {
-               if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DEBUG3)) {
+               if (isc_log_wouldlog(DNS_RRL_LOG_DEBUG3)) {
                        debit_log(e, age, "");
                }
                return (DNS_RRL_RESULT_OK);
@@ -738,7 +738,7 @@ debit_rrl_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, double qps, double scale,
                        new_slip = 2;
                }
                if (rrl->slip.scaled != new_slip) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
+                       isc_log_write(DNS_LOGCATEGORY_RRL,
                                      DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DEBUG1,
                                      "%d qps scaled slip"
                                      " by %.2f from %d to %d",
@@ -752,7 +752,7 @@ debit_rrl_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, double qps, double scale,
                        if ((int)e->slip_cnt >= slip) {
                                e->slip_cnt = 0;
                        }
-                       if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DEBUG3)) {
+                       if (isc_log_wouldlog(DNS_RRL_LOG_DEBUG3)) {
                                debit_log(e, age, "slip");
                        }
                        return (DNS_RRL_RESULT_SLIP);
@@ -761,7 +761,7 @@ debit_rrl_entry(dns_rrl_t *rrl, dns_rrl_entry_t *e, double qps, double scale,
                }
        }
 
-       if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DEBUG3)) {
+       if (isc_log_wouldlog(DNS_RRL_LOG_DEBUG3)) {
                debit_log(e, age, "drop");
        }
        return (DNS_RRL_RESULT_DROP);
@@ -970,9 +970,8 @@ log_end(dns_rrl_t *rrl, dns_rrl_entry_t *e, bool early, char *log_buf,
                                           : "stop limiting ",
                             true, NULL, false, DNS_RRL_RESULT_OK,
                             ISC_R_SUCCESS, log_buf, log_buf_len);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
-                             DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DROP, "%s",
-                             log_buf);
+               isc_log_write(DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
+                             DNS_RRL_LOG_DROP, "%s", log_buf);
                free_qname(rrl, e);
                e->logged = false;
                --rrl->num_logged;
@@ -1067,11 +1066,8 @@ dns_rrl(dns_view_t *view, dns_zone_t *zone, const isc_sockaddr_t *client_addr,
                } else {
                        qps = (1.0 * rrl->qps_responses) / secs;
                        if (secs >= rrl->window) {
-                               if (isc_log_wouldlog(dns_lctx,
-                                                    DNS_RRL_LOG_DEBUG3))
-                               {
-                                       isc_log_write(dns_lctx,
-                                                     DNS_LOGCATEGORY_RRL,
+                               if (isc_log_wouldlog(DNS_RRL_LOG_DEBUG3)) {
+                                       isc_log_write(DNS_LOGCATEGORY_RRL,
                                                      DNS_LOGMODULE_REQUEST,
                                                      DNS_RRL_LOG_DEBUG3,
                                                      "%d responses/%d seconds"
@@ -1143,7 +1139,7 @@ dns_rrl(dns_view_t *view, dns_zone_t *zone, const isc_sockaddr_t *client_addr,
                return (DNS_RRL_RESULT_OK);
        }
 
-       if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DEBUG1)) {
+       if (isc_log_wouldlog(DNS_RRL_LOG_DEBUG1)) {
                /*
                 * Do not worry about speed or releasing the lock.
                 * This message appears before messages from debit_rrl_entry().
@@ -1151,9 +1147,8 @@ dns_rrl(dns_view_t *view, dns_zone_t *zone, const isc_sockaddr_t *client_addr,
                make_log_buf(rrl, e, "consider limiting ", NULL, false, qname,
                             false, DNS_RRL_RESULT_OK, resp_result, log_buf,
                             log_buf_len);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
-                             DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DEBUG1, "%s",
-                             log_buf);
+               isc_log_write(DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
+                             DNS_RRL_LOG_DEBUG1, "%s", log_buf);
        }
 
        rrl_result = debit_rrl_entry(rrl, e, qps, scale, client_addr, now,
@@ -1184,13 +1179,13 @@ dns_rrl(dns_view_t *view, dns_zone_t *zone, const isc_sockaddr_t *client_addr,
                if (rrl_all_result != DNS_RRL_RESULT_OK) {
                        e = e_all;
                        rrl_result = rrl_all_result;
-                       if (isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DEBUG1)) {
+                       if (isc_log_wouldlog(DNS_RRL_LOG_DEBUG1)) {
                                make_log_buf(rrl, e,
                                             "prefer all-per-second limiting ",
                                             NULL, true, qname, false,
                                             DNS_RRL_RESULT_OK, resp_result,
                                             log_buf, log_buf_len);
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
+                               isc_log_write(DNS_LOGCATEGORY_RRL,
                                              DNS_LOGMODULE_REQUEST,
                                              DNS_RRL_LOG_DEBUG1, "%s",
                                              log_buf);
@@ -1207,7 +1202,7 @@ dns_rrl(dns_view_t *view, dns_zone_t *zone, const isc_sockaddr_t *client_addr,
         * Log occasionally in the rate-limit category.
         */
        if ((!e->logged || e->log_secs >= DNS_RRL_MAX_LOG_SECS) &&
-           isc_log_wouldlog(dns_lctx, DNS_RRL_LOG_DROP))
+           isc_log_wouldlog(DNS_RRL_LOG_DROP))
        {
                make_log_buf(rrl, e, rrl->log_only ? "would " : NULL,
                             e->logged ? "continue limiting " : "limit ", true,
@@ -1228,9 +1223,8 @@ dns_rrl(dns_view_t *view, dns_zone_t *zone, const isc_sockaddr_t *client_addr,
                        UNLOCK(&rrl->lock);
                        e = NULL;
                }
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_RRL,
-                             DNS_LOGMODULE_REQUEST, DNS_RRL_LOG_DROP, "%s",
-                             log_buf);
+               isc_log_write(DNS_LOGCATEGORY_RRL, DNS_LOGMODULE_REQUEST,
+                             DNS_RRL_LOG_DROP, "%s", log_buf);
        }
 
        /*
index b42b0a0dfd115dd4072bd57d45cee93a951fc55e..3442060773e9198a41db97288f6c9589c176e09f 100644 (file)
@@ -229,7 +229,7 @@ static void
 sdlz_log(int level, const char *fmt, ...) {
        va_list ap;
        va_start(ap, fmt);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
+       isc_log_vwrite(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ,
                       ISC_LOG_DEBUG(level), fmt, ap);
        va_end(ap);
 }
index b43c7cfac38e401ca53eeb87ca4fb7c9fc7f9615..fdfd3f6981f24fcc76e9b7ab9976c079bf4750c8 100644 (file)
@@ -373,8 +373,7 @@ dns_ssutable_checkrules(dns_ssutable_t *table, const dns_name_t *signer,
                        rcu_read_unlock();
                        if (match == 0) {
                                if (signer != NULL) {
-                                       isc_log_write(dns_lctx,
-                                                     DNS_LOGCATEGORY_GENERAL,
+                                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                                      DNS_LOGMODULE_SSU,
                                                      ISC_LOG_WARNING,
                                                      "update-policy local: "
index 0799315393b2a105e9f949983aac4bf4cbd60e70..c2c05e9bedcb15314e438b6611e0b5960d452c31 100644 (file)
@@ -45,7 +45,7 @@ ssu_e_log(int level, const char *fmt, ...) {
        va_list ap;
 
        va_start(ap, fmt);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_SECURITY, DNS_LOGMODULE_ZONE,
+       isc_log_vwrite(DNS_LOGCATEGORY_SECURITY, DNS_LOGMODULE_ZONE,
                       ISC_LOG_DEBUG(level), fmt, ap);
        va_end(ap);
 }
index 8133d927a3c86690ac0713bdfa828aee87bf7d90..3c3c35581a2fe90184986e1108f69d683fbab754 100644 (file)
@@ -70,7 +70,7 @@ tkey_log(const char *fmt, ...) {
        va_list ap;
 
        va_start(ap, fmt);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_REQUEST,
+       isc_log_vwrite(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_REQUEST,
                       ISC_LOG_DEBUG(4), fmt, ap);
        va_end(ap);
 }
index e4821194c08ee6c38ff9023e02ed136e35abcf27..eb579d1055c82feb8097fab6c287aa9562838770 100644 (file)
@@ -124,7 +124,7 @@ tsig_log(dns_tsigkey_t *key, int level, const char *fmt, ...) {
        char namestr[DNS_NAME_FORMATSIZE];
        char creatorstr[DNS_NAME_FORMATSIZE];
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
        if (key != NULL) {
@@ -143,14 +143,12 @@ tsig_log(dns_tsigkey_t *key, int level, const char *fmt, ...) {
        vsnprintf(message, sizeof(message), fmt, ap);
        va_end(ap);
        if (key != NULL && key->generated) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_TSIG, level,
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_TSIG, level,
                              "tsig key '%s' (%s): %s", namestr, creatorstr,
                              message);
        } else {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_TSIG, level, "tsig key '%s': %s",
-                             namestr, message);
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_TSIG, level,
+                             "tsig key '%s': %s", namestr, message);
        }
 }
 
@@ -286,8 +284,8 @@ dns_tsigkey_createfromkey(const dns_name_t *name, dst_algorithm_t algorithm,
        {
                char namestr[DNS_NAME_FORMATSIZE];
                dns_name_format(name, namestr, sizeof(namestr));
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                             DNS_LOGMODULE_TSIG, ISC_LOG_INFO,
+               isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_TSIG,
+                             ISC_LOG_INFO,
                              "the key '%s' is too short to be secure",
                              namestr);
        }
index 0deef07b4b2c01e250b7b421af027e1d79fe856a..cc0f545f3eece7498fe920c4894e9becf93aa7e7 100644 (file)
                case DNS_R_NXRRSET:                                        \
                        _what = "unsuccessful";                            \
                }                                                          \
-               if (isc_log_wouldlog(dns_lctx, LOGLEVEL_PROTOCOL)) {       \
+               if (isc_log_wouldlog(LOGLEVEL_PROTOCOL)) {                 \
                        char _nbuf[DNS_NAME_FORMATSIZE];                   \
                        dns_name_format(name, _nbuf, sizeof(_nbuf));       \
                        update_log(log, zone, LOGLEVEL_PROTOCOL,           \
                case DNS_R_NXRRSET:                                           \
                        _what = "unsuccessful";                               \
                }                                                             \
-               if (isc_log_wouldlog(dns_lctx, LOGLEVEL_PROTOCOL)) {          \
+               if (isc_log_wouldlog(LOGLEVEL_PROTOCOL)) {                    \
                        char _nbuf[DNS_NAME_FORMATSIZE];                      \
                        char _tbuf[DNS_RDATATYPE_FORMATSIZE];                 \
                        dns_name_format(name, _nbuf, sizeof(_nbuf));          \
@@ -208,7 +208,7 @@ update_log(dns_update_log_t *callback, dns_zone_t *zone, int level,
                return;
        }
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
index 814551d759e77993ef502e9218c45b4fbac6ad97..5bd046c16801dafb32e1221c8223f920e9ca911c 100644 (file)
@@ -3540,11 +3540,11 @@ validator_logv(dns_validator_t *val, isc_logcategory_t *category,
 
                dns_name_format(val->name, namebuf, sizeof(namebuf));
                dns_rdatatype_format(val->type, typebuf, sizeof(typebuf));
-               isc_log_write(dns_lctx, category, module, level,
+               isc_log_write(category, module, level,
                              "%s%s%s%.*svalidating %s/%s: %s", sep1, viewname,
                              sep2, depth, spaces, namebuf, typebuf, msgbuf);
        } else {
-               isc_log_write(dns_lctx, category, module, level,
+               isc_log_write(category, module, level,
                              "%s%s%s%.*svalidator @%p: %s", sep1, viewname,
                              sep2, depth, spaces, val, msgbuf);
        }
@@ -3554,7 +3554,7 @@ static void
 validator_log(void *val, int level, const char *fmt, ...) {
        va_list ap;
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
index bcac41bb8055a31585f7e7420dd451d7dbd75af7..a839ae839d852831d581f32563b5e4f98b0256bd 100644 (file)
@@ -1864,9 +1864,8 @@ dns_view_setnewzones(dns_view_t *view, bool allow, void *cfgctx,
 
        status = mdb_env_create(&env);
        if (status != MDB_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             ISC_LOGMODULE_OTHER, ISC_LOG_ERROR,
-                             "mdb_env_create failed: %s",
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, ISC_LOGMODULE_OTHER,
+                             ISC_LOG_ERROR, "mdb_env_create failed: %s",
                              mdb_strerror(status));
                CHECK(ISC_R_FAILURE);
        }
@@ -1874,7 +1873,7 @@ dns_view_setnewzones(dns_view_t *view, bool allow, void *cfgctx,
        if (mapsize != 0ULL) {
                status = mdb_env_set_mapsize(env, mapsize);
                if (status != MDB_SUCCESS) {
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_OTHER, ISC_LOG_ERROR,
                                      "mdb_env_set_mapsize failed: %s",
                                      mdb_strerror(status));
@@ -1885,9 +1884,8 @@ dns_view_setnewzones(dns_view_t *view, bool allow, void *cfgctx,
 
        status = mdb_env_open(env, view->new_zone_db, DNS_LMDB_FLAGS, 0600);
        if (status != MDB_SUCCESS) {
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             ISC_LOGMODULE_OTHER, ISC_LOG_ERROR,
-                             "mdb_env_open of '%s' failed: %s",
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, ISC_LOGMODULE_OTHER,
+                             ISC_LOG_ERROR, "mdb_env_open of '%s' failed: %s",
                              view->new_zone_db, mdb_strerror(status));
                CHECK(ISC_R_FAILURE);
        }
@@ -2184,8 +2182,8 @@ dns_view_loadnta(dns_view_t *view) {
                } else {
                        char nb[DNS_NAME_FORMATSIZE];
                        dns_name_format(ntaname, nb, sizeof(nb));
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DNSSEC,
-                                     DNS_LOGMODULE_NTA, ISC_LOG_INFO,
+                       isc_log_write(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_NTA,
+                                     ISC_LOG_INFO,
                                      "ignoring expired NTA at %s", nb);
                }
        }
index f321924728a9cf28098d2f5ace557f61a5202018..6b81048243358031724b9f24090dadef6895f3ba 100644 (file)
@@ -2121,7 +2121,7 @@ xfrin_log(dns_xfrin_t *xfr, int level, const char *fmt, ...) {
        char primarytext[ISC_SOCKADDR_FORMATSIZE];
        char msgtext[2048];
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -2131,7 +2131,7 @@ xfrin_log(dns_xfrin_t *xfr, int level, const char *fmt, ...) {
        vsnprintf(msgtext, sizeof(msgtext), fmt, ap);
        va_end(ap);
 
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_XFER_IN, DNS_LOGMODULE_XFER_IN,
-                     level, "%p: transfer of '%s' from %s: %s", xfr, xfr->info,
+       isc_log_write(DNS_LOGCATEGORY_XFER_IN, DNS_LOGMODULE_XFER_IN, level,
+                     "%p: transfer of '%s' from %s: %s", xfr, xfr->info,
                      primarytext, msgtext);
 }
index 8336f27485543a0770ff9156a74c2af8c84739a7..050ad77c190fa4704a587dc7be57ebf8ee82edb5 100644 (file)
@@ -4873,7 +4873,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
                        if (remove(zone->journal) < 0 && errno != ENOENT) {
                                char strbuf[ISC_STRERRORSIZE];
                                strerror_r(errno, strbuf, sizeof(strbuf));
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_ZONE,
                                              ISC_LOG_WARNING,
                                              "unable to remove journal "
@@ -6203,7 +6203,7 @@ findzonekeys(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
                                         algbuf, dst_key_id(pubkey));
                        }
 
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_DNSSEC, ISC_LOG_WARNING,
                                      "dns_zone_findkeys: error reading %s: %s",
                                      filename, isc_result_totext(result));
@@ -10918,7 +10918,7 @@ zone_refreshkeys(dns_zone_t *zone) {
                        dns_rdataset_clone(kdset, &kfetch->keydataset);
                        dns_db_attach(db, &kfetch->db);
 
-                       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+                       if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                                char namebuf[DNS_NAME_FORMATSIZE];
                                dns_name_format(kname, namebuf,
                                                sizeof(namebuf));
@@ -15740,7 +15740,7 @@ dns_zone_logv(dns_zone_t *zone, isc_logcategory_t *category, int level,
 
        REQUIRE(DNS_ZONE_VALID(zone));
 
-       if (!isc_log_wouldlog(dns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -15757,8 +15757,8 @@ dns_zone_logv(dns_zone_t *zone, isc_logcategory_t *category, int level,
                zstr = "zone ";
        }
 
-       isc_log_write(dns_lctx, category, DNS_LOGMODULE_ZONE, level,
-                     "%s%s%s%s: %s", (prefix != NULL ? prefix : ""),
+       isc_log_write(category, DNS_LOGMODULE_ZONE, level, "%s%s%s%s: %s",
+                     (prefix != NULL ? prefix : ""),
                      (prefix != NULL ? ": " : ""), zstr, zone->strnamerd,
                      message);
 }
@@ -16950,8 +16950,8 @@ save_nsec3param(dns_zone_t *zone, nsec3paramlist_t *nsec3list) {
                dns_rdata_t private = DNS_RDATA_INIT;
 
                dns_rdataset_current(&rdataset, &rdata);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_ZONE, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_ZONE,
+                             ISC_LOG_DEBUG(3),
                              "looping through nsec3param data");
                nsec3param = isc_mem_get(zone->mctx, sizeof(nsec3param_t));
                ISC_LINK_INIT(nsec3param, link);
@@ -16986,8 +16986,8 @@ getprivate:
                dns_rdata_t private = DNS_RDATA_INIT;
 
                dns_rdataset_current(&prdataset, &private);
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
-                             DNS_LOGMODULE_ZONE, ISC_LOG_DEBUG(3),
+               isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_ZONE,
+                             ISC_LOG_DEBUG(3),
                              "looping through nsec3param private data");
 
                /*
@@ -17482,7 +17482,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
                        {
                                char strbuf[ISC_STRERRORSIZE];
                                strerror_r(errno, strbuf, sizeof(strbuf));
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_ZONE,
                                              ISC_LOG_WARNING,
                                              "unable to remove masterfile "
@@ -17507,13 +17507,13 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
                         * up-to-date, it is useless and should be
                         * removed.
                         */
-                       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                       isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                      DNS_LOGMODULE_ZONE, ISC_LOG_DEBUG(3),
                                      "removing journal file");
                        if (remove(zone->journal) < 0 && errno != ENOENT) {
                                char strbuf[ISC_STRERRORSIZE];
                                strerror_r(errno, strbuf, sizeof(strbuf));
-                               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                               isc_log_write(DNS_LOGCATEGORY_GENERAL,
                                              DNS_LOGMODULE_ZONE,
                                              ISC_LOG_WARNING,
                                              "unable to remove journal "
@@ -20568,8 +20568,8 @@ static void
 dnssec_report(const char *format, ...) {
        va_list args;
        va_start(args, format);
-       isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_ZONE,
-                      ISC_LOG_INFO, format, args);
+       isc_log_vwrite(DNS_LOGCATEGORY_DNSSEC, DNS_LOGMODULE_ZONE, ISC_LOG_INFO,
+                      format, args);
        va_end(args);
 }
 
@@ -21579,7 +21579,7 @@ nsfetch_done(void *arg) {
                        break;
                }
 
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                        char nsnamebuf[DNS_NAME_FORMATSIZE];
                        dns_name_format(&ns.name, nsnamebuf, sizeof(nsnamebuf));
                        dns_zone_log(zone, ISC_LOG_DEBUG(3),
@@ -21656,7 +21656,7 @@ do_nsfetch(void *arg) {
                goto cleanup;
        }
 
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                char namebuf[DNS_NAME_FORMATSIZE];
                dns_name_format(&nsfetch->pname, namebuf, sizeof(namebuf));
                dnssec_log(zone, ISC_LOG_WARNING,
@@ -21727,7 +21727,7 @@ nsfetch_levelup(dns_nsfetch_t *nsfetch) {
 
                dns_rdataset_init(&nsfetch->nsrrset);
                dns_rdataset_init(&nsfetch->nssigset);
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                        dnssec_log(zone, ISC_LOG_DEBUG(3),
                                   "Creating parent NS fetch in "
                                   "nsfetch_levelup()");
@@ -21809,7 +21809,7 @@ zone_checkds(dns_zone_t *zone) {
                dns_name_dup(&zone->origin, zone->mctx, name);
                dns_rdataset_init(&nsfetch->nsrrset);
                dns_rdataset_init(&nsfetch->nssigset);
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                        dnssec_log(
                                zone, ISC_LOG_DEBUG(3),
                                "Creating parent NS fetch in zone_checkds()");
@@ -22502,7 +22502,7 @@ zone_rekey(dns_zone_t *zone) {
        }
        UNLOCK_ZONE(zone);
 
-       if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                for (key = ISC_LIST_HEAD(dnskeys); key != NULL;
                     key = ISC_LIST_NEXT(key, link))
                {
@@ -23798,7 +23798,7 @@ dns_zone_setnsec3param(dns_zone_t *zone, uint8_t hash, uint8_t flags,
 
                np->rdata = param;
 
-               if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                        unsigned char salttext[255 * 2 + 1];
                        if (param.salt != NULL) {
                                salt2text(param.salt, param.salt_length,
index edcb86ce18ddd5fd3182871886a746a86f760dce..3d0b48176ab63f5e010b5c080109240610ae075d 100644 (file)
@@ -466,8 +466,8 @@ freezezones(dns_zone_t *zone, void *uap) {
                              sizeof(classstr));
        dns_name_format(dns_zone_getorigin(zone), zonename, sizeof(zonename));
        level = (result != ISC_R_SUCCESS) ? ISC_LOG_ERROR : ISC_LOG_DEBUG(1);
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_ZONE,
-                     level, "%s zone '%s/%s'%s%s: %s",
+       isc_log_write(DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_ZONE, level,
+                     "%s zone '%s/%s'%s%s: %s",
                      params->freeze ? "freezing" : "thawing", zonename,
                      classstr, sep, vname, isc_result_totext(result));
        if (raw != NULL) {
index 23369417fcc1558d39149aa7b32ca4adec43370e..0fa27edd89c1748146e38b9cca421f9a8c4af534 100644 (file)
@@ -62,8 +62,8 @@ isc_backtrace_symbols_fd(void *const *buffer, int size, int fd) {
 }
 
 void
-isc_backtrace_log(isc_log_t *lctx, isc_logcategory_t *category,
-                 isc_logmodule_t *module, int level) {
+isc_backtrace_log(isc_logcategory_t *category, isc_logmodule_t *module,
+                 int level) {
        void *tracebuf[ISC_BACKTRACE_MAXFRAME];
        int nframes;
        char **strs;
@@ -77,7 +77,7 @@ isc_backtrace_log(isc_log_t *lctx, isc_logcategory_t *category,
                return;
        }
        for (int i = 0; i < nframes; i++) {
-               isc_log_write(lctx, category, module, level, "%s", strs[i]);
+               isc_log_write(category, module, level, "%s", strs[i]);
        }
 }
 
@@ -107,9 +107,8 @@ isc_backtrace_symbols_fd(void *const *buffer, int size, int fd) {
 }
 
 void
-isc_backtrace_log(isc_log_t *lctx, isc_logcategory_t *category,
-                 isc_logmodule_t *module, int level) {
-       UNUSED(lctx);
+isc_backtrace_log(isc_logcategory_t *category, isc_logmodule_t *module,
+                 int level) {
        UNUSED(category);
        UNUSED(module);
        UNUSED(level);
index 354d7647e0b39726b776e126c02ba1c59a899d2d..439e882aad7d30159d05f7ea11d724d92831d453 100644 (file)
@@ -370,7 +370,7 @@ isc_file_openuniquemode(char *templet, int mode, FILE **fp) {
        if (f == NULL) {
                result = isc__errno2result(errno);
                if (remove(templet) < 0) {
-                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                       isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_FILE, ISC_LOG_ERROR,
                                      "remove '%s': failed", templet);
                }
index 7605b6f967ef2da84990d363fb68488df43f6339..bfe887ce82600b51c48a87e480a4b52a79e74d7c 100644 (file)
@@ -105,8 +105,8 @@ isc_backtrace_symbols_fd(void *const *buffer, int size, int fd);
  */
 
 void
-isc_backtrace_log(isc_log_t *lctx, isc_logcategory_t *category,
-                 isc_logmodule_t *module, int level);
+isc_backtrace_log(isc_logcategory_t *category, isc_logmodule_t *module,
+                 int level);
 /*
  * Write a backtrace to the log.
  */
index e9b25a6073877aa283bf52d035f97c5014d68c86..6b67e0a3dca5236d8c1510dd55584681c34446b0 100644 (file)
@@ -160,7 +160,6 @@ typedef union isc_logdestination {
  * the order of the names.
  */
 extern isc_logcategory_t isc_categories[];
-extern isc_log_t       *isc_lctx __attribute__((__deprecated__));
 extern isc_logmodule_t  isc_modules[];
 /*@}*/
 
@@ -185,7 +184,7 @@ extern isc_logmodule_t       isc_modules[];
 ISC_LANG_BEGINDECLS
 
 void
-isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp);
+isc_logconfig_create(isc_logconfig_t **lcfgp);
 /*%<
  * Create the data structure that holds all of the configurable information
  * about where messages are actually supposed to be sent -- the information
@@ -227,9 +226,9 @@ isc_logconfig_create(isc_log_t *lctx, isc_logconfig_t **lcfgp);
  */
 
 isc_logconfig_t *
-isc_logconfig_get(isc_log_t *lctx);
+isc_logconfig_get(void);
 void
-isc_logconfig_set(isc_log_t *lctx, isc_logconfig_t *lcfg);
+isc_logconfig_set(isc_logconfig_t *lcfg);
 /*%<
  * Getter/setter for a configuration with a logging context.
  *
@@ -264,7 +263,7 @@ isc_logconfig_destroy(isc_logconfig_t **lcfgp);
  */
 
 void
-isc_log_registercategories(isc_log_t *lctx, isc_logcategory_t categories[]);
+isc_log_registercategories(isc_logcategory_t categories[]);
 /*%<
  * Identify logging categories a library will use.
  *
@@ -302,7 +301,7 @@ isc_log_registercategories(isc_log_t *lctx, isc_logcategory_t categories[]);
  */
 
 void
-isc_log_registermodules(isc_log_t *lctx, isc_logmodule_t modules[]);
+isc_log_registermodules(isc_logmodule_t modules[]);
 /*%<
  * Identify logging categories a library will use.
  *
@@ -500,10 +499,10 @@ isc_log_usechannel(isc_logconfig_t *lcfg, const char *name,
  *     meaningful error.
  */
 void
-isc_log_write(isc_log_t *lctx, isc_logcategory_t *category,
-             isc_logmodule_t *module, int level, const char *format, ...)
+isc_log_write(isc_logcategory_t *category, isc_logmodule_t *module, int level,
+             const char *format, ...)
 
-       ISC_FORMAT_PRINTF(5, 6);
+       ISC_FORMAT_PRINTF(4, 5);
 
 /*%
  * Write a message to the log channels.
@@ -538,14 +537,13 @@ isc_log_write(isc_log_t *lctx, isc_logcategory_t *category,
  *     meaningful error.
  */
 void
-isc_log_vwrite(isc_log_t *lctx, isc_logcategory_t *category,
-              isc_logmodule_t *module, int level, const char *format,
-              va_list args)
+isc_log_vwrite(isc_logcategory_t *category, isc_logmodule_t *module, int level,
+              const char *format, va_list args)
 
-       ISC_FORMAT_PRINTF(5, 0);
+       ISC_FORMAT_PRINTF(4, 0);
 
 void
-isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level);
+isc_log_setdebuglevel(unsigned int level);
 /*%<
  * Set the debugging level used for logging.
  *
@@ -560,7 +558,7 @@ isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level);
  */
 
 unsigned int
-isc_log_getdebuglevel(isc_log_t *lctx);
+isc_log_getdebuglevel(void);
 /*%<
  * Get the current debugging level.
  *
@@ -579,7 +577,7 @@ isc_log_getdebuglevel(isc_log_t *lctx);
  */
 
 bool
-isc_log_wouldlog(isc_log_t *lctx, int level);
+isc_log_wouldlog(int level);
 /*%<
  * Determine whether logging something to 'lctx' at 'level' would
  * actually cause something to be logged somewhere.
@@ -674,7 +672,7 @@ isc_log_opensyslog(const char *tag, int options, int facility);
  */
 
 void
-isc_log_closefilelogs(isc_log_t *lctx);
+isc_log_closefilelogs(void);
 /*%<
  * Close all open files used by #ISC_LOG_TOFILE channels.
  *
@@ -696,7 +694,7 @@ isc_log_closefilelogs(isc_log_t *lctx);
  */
 
 isc_logcategory_t *
-isc_log_categorybyname(isc_log_t *lctx, const char *name);
+isc_log_categorybyname(const char *name);
 /*%<
  * Find a category by its name.
  *
@@ -714,7 +712,7 @@ isc_log_categorybyname(isc_log_t *lctx, const char *name);
  */
 
 isc_logmodule_t *
-isc_log_modulebyname(isc_log_t *lctx, const char *name);
+isc_log_modulebyname(const char *name);
 /*%<
  * Find a module by its name.
  *
index 8a74a161aa5fa97d870a5244750831f96115171e..8ff41178532f4d3bc7a7c8a96301a0bb31bda6f6 100644 (file)
@@ -49,7 +49,6 @@ typedef void(isc_httpdondestroy_t)(void *); /*%< Callback on destroying httpd */
 typedef struct isc_interface    isc_interface_t;     /*%< Interface */
 typedef struct isc_interfaceiter isc_interfaceiter_t; /*%< Interface Iterator */
 typedef struct isc_lex          isc_lex_t;           /*%< Lex */
-typedef struct isc_log          isc_log_t;           /*%< Log */
 typedef struct isc_logcategory  isc_logcategory_t;   /*%< Log Category */
 typedef struct isc_logconfig    isc_logconfig_t;     /*%< Log Configuration */
 typedef struct isc_logmodule    isc_logmodule_t;     /*%< Log Module */
index 12db67f481b3bcbd7eeb16cb8c346ec79b4a112e..badb37e79f827650cc396055facd6e50d93a9291 100644 (file)
@@ -50,6 +50,11 @@ static thread_local bool forcelog = false;
  */
 #define LOG_BUFFER_SIZE (8 * 1024)
 
+/*
+ * Private isc_log_t data type.
+ */
+typedef struct isc_log isc_log_t;
+
 /*!
  * This is the structure that holds each named channel.  A simple linked
  * list chains all of the channels together, so an individual channel is
@@ -189,7 +194,6 @@ static isc_logchannellist_t default_channel;
 /*!
  * libisc logs to this context.
  */
-isc_log_t *isc_lctx __attribute__((__deprecated__)) = NULL;
 static isc_log_t *isc__lctx = NULL;
 
 /*!
@@ -203,15 +207,14 @@ static void
 sync_channellist(isc_logconfig_t *lcfg);
 
 static void
-sync_highest_level(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logconfig_t *lcfg);
+sync_highest_level(isc_logconfig_t *lcfg);
 
 static isc_result_t
 greatest_version(isc_logfile_t *file, int versions, int *greatest);
 
 static void
-isc_log_doit(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logcategory_t *category,
-            isc_logmodule_t *module, int level, const char *format,
-            va_list args) ISC_FORMAT_PRINTF(5, 0);
+isc_log_doit(isc_logcategory_t *category, isc_logmodule_t *module, int level,
+            const char *format, va_list args) ISC_FORMAT_PRINTF(4, 0);
 
 /*@{*/
 /*!
@@ -232,8 +235,7 @@ isc_log_doit(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logcategory_t *category,
 ****/
 
 void
-isc_logconfig_create(isc_log_t *__lctx ISC_ATTR_UNUSED,
-                    isc_logconfig_t **lcfgp) {
+isc_logconfig_create(isc_logconfig_t **lcfgp) {
        REQUIRE(lcfgp != NULL && *lcfgp == NULL);
        REQUIRE(VALID_CONTEXT(isc__lctx));
 
@@ -287,14 +289,14 @@ isc_logconfig_create(isc_log_t *__lctx ISC_ATTR_UNUSED,
 }
 
 isc_logconfig_t *
-isc_logconfig_get(isc_log_t *__lctx ISC_ATTR_UNUSED) {
+isc_logconfig_get(void) {
        REQUIRE(VALID_CONTEXT(isc__lctx));
 
        return (rcu_dereference(isc__lctx->logconfig));
 }
 
 void
-isc_logconfig_set(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logconfig_t *lcfg) {
+isc_logconfig_set(isc_logconfig_t *lcfg) {
        REQUIRE(VALID_CONTEXT(isc__lctx));
        REQUIRE(VALID_CONFIG(lcfg));
        REQUIRE(lcfg->lctx == isc__lctx);
@@ -308,7 +310,7 @@ isc_logconfig_set(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logconfig_t *lcfg) {
 
        isc_logconfig_t *old_cfg = rcu_xchg_pointer(&isc__lctx->logconfig,
                                                    lcfg);
-       sync_highest_level(isc__lctx, lcfg);
+       sync_highest_level(lcfg);
        synchronize_rcu();
 
        if (old_cfg != NULL) {
@@ -388,8 +390,7 @@ isc_logconfig_destroy(isc_logconfig_t **lcfgp) {
 }
 
 void
-isc_log_registercategories(isc_log_t *__lctx ISC_ATTR_UNUSED,
-                          isc_logcategory_t categories[]) {
+isc_log_registercategories(isc_logcategory_t categories[]) {
        REQUIRE(VALID_CONTEXT(isc__lctx));
        REQUIRE(categories != NULL && categories[0].name != NULL);
 
@@ -434,7 +435,7 @@ isc_log_registercategories(isc_log_t *__lctx ISC_ATTR_UNUSED,
 }
 
 isc_logcategory_t *
-isc_log_categorybyname(isc_log_t *__lctx ISC_ATTR_UNUSED, const char *name) {
+isc_log_categorybyname(const char *name) {
        isc_logcategory_t *catp;
 
        REQUIRE(VALID_CONTEXT(isc__lctx));
@@ -459,8 +460,7 @@ isc_log_categorybyname(isc_log_t *__lctx ISC_ATTR_UNUSED, const char *name) {
 }
 
 void
-isc_log_registermodules(isc_log_t *__lctx ISC_ATTR_UNUSED,
-                       isc_logmodule_t modules[]) {
+isc_log_registermodules(isc_logmodule_t modules[]) {
        REQUIRE(VALID_CONTEXT(isc__lctx));
        REQUIRE(modules != NULL && modules[0].name != NULL);
 
@@ -505,7 +505,7 @@ isc_log_registermodules(isc_log_t *__lctx ISC_ATTR_UNUSED,
 }
 
 isc_logmodule_t *
-isc_log_modulebyname(isc_log_t *__lctx ISC_ATTR_UNUSED, const char *name) {
+isc_log_modulebyname(const char *name) {
        isc_logmodule_t *modp;
 
        REQUIRE(VALID_CONTEXT(isc__lctx));
@@ -650,7 +650,7 @@ isc_log_usechannel(isc_logconfig_t *lcfg, const char *name,
         */
        rcu_read_lock();
        if (rcu_dereference(lcfg->lctx->logconfig) == lcfg) {
-               sync_highest_level(lctx, lcfg);
+               sync_highest_level(lcfg);
        }
        rcu_read_unlock();
 
@@ -658,8 +658,8 @@ isc_log_usechannel(isc_logconfig_t *lcfg, const char *name,
 }
 
 void
-isc_log_write(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logcategory_t *category,
-             isc_logmodule_t *module, int level, const char *format, ...) {
+isc_log_write(isc_logcategory_t *category, isc_logmodule_t *module, int level,
+             const char *format, ...) {
        va_list args;
 
        /*
@@ -667,22 +667,21 @@ isc_log_write(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logcategory_t *category,
         */
 
        va_start(args, format);
-       isc_log_doit(NULL, category, module, level, format, args);
+       isc_log_doit(category, module, level, format, args);
        va_end(args);
 }
 
 void
-isc_log_vwrite(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logcategory_t *category,
-              isc_logmodule_t *module, int level, const char *format,
-              va_list args) {
+isc_log_vwrite(isc_logcategory_t *category, isc_logmodule_t *module, int level,
+              const char *format, va_list args) {
        /*
         * Contract checking is done in isc_log_doit().
         */
-       isc_log_doit(NULL, category, module, level, format, args);
+       isc_log_doit(category, module, level, format, args);
 }
 
 void
-isc_log_setdebuglevel(isc_log_t *__lctx ISC_ATTR_UNUSED, unsigned int level) {
+isc_log_setdebuglevel(unsigned int level) {
        REQUIRE(VALID_CONTEXT(isc__lctx));
 
        atomic_store_release(&isc__lctx->debug_level, level);
@@ -714,7 +713,7 @@ isc_log_setdebuglevel(isc_log_t *__lctx ISC_ATTR_UNUSED, unsigned int level) {
 }
 
 unsigned int
-isc_log_getdebuglevel(isc_log_t *__lctx ISC_ATTR_UNUSED) {
+isc_log_getdebuglevel(void) {
        REQUIRE(VALID_CONTEXT(isc__lctx));
 
        return (atomic_load_acquire(&isc__lctx->debug_level));
@@ -751,7 +750,7 @@ isc_log_opensyslog(const char *tag, int options, int facility) {
 }
 
 void
-isc_log_closefilelogs(isc_log_t *__lctx ISC_ATTR_UNUSED) {
+isc_log_closefilelogs(void) {
        REQUIRE(VALID_CONTEXT(isc__lctx));
 
        rcu_read_lock();
@@ -840,7 +839,7 @@ sync_channellist(isc_logconfig_t *lcfg) {
 }
 
 static void
-sync_highest_level(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logconfig_t *lcfg) {
+sync_highest_level(isc_logconfig_t *lcfg) {
        atomic_store(&isc__lctx->highest_level, lcfg->highest_level);
        atomic_store(&isc__lctx->dynamic, lcfg->dynamic);
 }
@@ -1297,7 +1296,7 @@ isc_log_open(isc_logchannel_t *channel) {
 }
 
 ISC_NO_SANITIZE_THREAD bool
-isc_log_wouldlog(isc_log_t *__lctx ISC_ATTR_UNUSED, int level) {
+isc_log_wouldlog(int level) {
        /*
         * Try to avoid locking the mutex for messages which can't
         * possibly be logged to any channels -- primarily debugging
@@ -1330,9 +1329,8 @@ isc_log_wouldlog(isc_log_t *__lctx ISC_ATTR_UNUSED, int level) {
 }
 
 static void
-isc_log_doit(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logcategory_t *category,
-            isc_logmodule_t *module, int level, const char *format,
-            va_list args) {
+isc_log_doit(isc_logcategory_t *category, isc_logmodule_t *module, int level,
+            const char *format, va_list args) {
        int syslog_level;
        const char *time_string;
        char local_time[64];
@@ -1366,7 +1364,7 @@ isc_log_doit(isc_log_t *__lctx ISC_ATTR_UNUSED, isc_logcategory_t *category,
        REQUIRE(category->id < isc__lctx->category_count);
        REQUIRE(module->id < isc__lctx->module_count);
 
-       if (!isc_log_wouldlog(isc__lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -1662,12 +1660,12 @@ isc__log_initialize(void) {
 
        isc_mutex_init(&isc__lctx->lock);
 
-       isc_log_registercategories(isc__lctx, isc_categories);
-       isc_log_registermodules(isc__lctx, isc_modules);
+       isc_log_registercategories(isc_categories);
+       isc_log_registermodules(isc_modules);
 
        /* Create default logging configuration */
        isc_logconfig_t *lcfg = NULL;
-       isc_logconfig_create(isc__lctx, &lcfg);
+       isc_logconfig_create(&lcfg);
        sync_channellist(lcfg);
 
        atomic_init(&isc__lctx->highest_level, lcfg->highest_level);
index 5cad59e2e6c106c0e5a82f6b67b9eff43c4c1553..8f2fcdf8e831342be620e312f87cba9a35fc3c01 100644 (file)
@@ -466,9 +466,9 @@ void
 isc_loopmgr_pause(isc_loopmgr_t *loopmgr) {
        REQUIRE(VALID_LOOPMGR(loopmgr));
 
-       if (isc_log_wouldlog(isc_lctx, ISC_LOG_DEBUG(1))) {
-               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                             ISC_LOGMODULE_OTHER, ISC_LOG_DEBUG(1),
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
+               isc_log_write(ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_OTHER,
+                             ISC_LOG_DEBUG(1),
                              "loop exclusive mode: starting");
        }
 
@@ -488,10 +488,9 @@ isc_loopmgr_pause(isc_loopmgr_t *loopmgr) {
                                                     &(bool){ false }, true));
        pause_loop(CURRENT_LOOP(loopmgr));
 
-       if (isc_log_wouldlog(isc_lctx, ISC_LOG_DEBUG(1))) {
-               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                             ISC_LOGMODULE_OTHER, ISC_LOG_DEBUG(1),
-                             "loop exclusive mode: started");
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
+               isc_log_write(ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_OTHER,
+                             ISC_LOG_DEBUG(1), "loop exclusive mode: started");
        }
 }
 
@@ -499,20 +498,18 @@ void
 isc_loopmgr_resume(isc_loopmgr_t *loopmgr) {
        REQUIRE(VALID_LOOPMGR(loopmgr));
 
-       if (isc_log_wouldlog(isc_lctx, ISC_LOG_DEBUG(1))) {
-               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                             ISC_LOGMODULE_OTHER, ISC_LOG_DEBUG(1),
-                             "loop exclusive mode: ending");
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
+               isc_log_write(ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_OTHER,
+                             ISC_LOG_DEBUG(1), "loop exclusive mode: ending");
        }
 
        RUNTIME_CHECK(atomic_compare_exchange_strong(&loopmgr->paused,
                                                     &(bool){ true }, false));
        resume_loop(CURRENT_LOOP(loopmgr));
 
-       if (isc_log_wouldlog(isc_lctx, ISC_LOG_DEBUG(1))) {
-               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
-                             ISC_LOGMODULE_OTHER, ISC_LOG_DEBUG(1),
-                             "loop exclusive mode: ended");
+       if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
+               isc_log_write(ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_OTHER,
+                             ISC_LOG_DEBUG(1), "loop exclusive mode: ended");
        }
 }
 
index 19c15071df5bceffc9c63dbbd3cae632f83cf30b..549e7a94fb54d514ba579765c8740be796fefc97 100644 (file)
@@ -148,11 +148,11 @@ try_proto(int domain) {
                len = sizeof(sin6);
                if (getsockname(s, (struct sockaddr *)&sin6, (void *)&len) < 0)
                {
-                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                       isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
                                      "retrieving the address of an IPv6 "
                                      "socket from the kernel failed.");
-                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                       isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR,
                                      "IPv6 is not supported.");
                        result = ISC_R_NOTFOUND;
@@ -160,12 +160,12 @@ try_proto(int domain) {
                        if (len == sizeof(struct sockaddr_in6)) {
                                result = ISC_R_SUCCESS;
                        } else {
-                               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                               isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                              ISC_LOGMODULE_SOCKET,
                                              ISC_LOG_ERROR,
                                              "IPv6 structures in kernel and "
                                              "user space do not match.");
-                               isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                               isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                              ISC_LOGMODULE_SOCKET,
                                              ISC_LOG_ERROR,
                                              "IPv6 is not supported.");
index 4dbf6080df7bc79ded7cb2876e7b45996701a4cb..2ebf9055ddbc6295dc2617121b49e1e42c2b68bb 100644 (file)
@@ -2028,7 +2028,7 @@ log_server_error_response(const isc_nmsocket_t *socket,
        char client_sabuf[ISC_SOCKADDR_FORMATSIZE];
        char local_sabuf[ISC_SOCKADDR_FORMATSIZE];
 
-       if (!isc_log_wouldlog(isc_lctx, log_level)) {
+       if (!isc_log_wouldlog(log_level)) {
                return;
        }
 
index d279bd5bd5f779759ca19869794c88d5a2a01bad..83a0fd05d98f79e387f5cebd201ad6ee044ae8ce 100644 (file)
@@ -1947,7 +1947,7 @@ isc__nmsocket_reset(isc_nmsocket_t *sock) {
                int r = uv_tcp_close_reset(&sock->uv_handle.tcp,
                                           reset_shutdown);
                if (r != 0) {
-                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
+                       isc_log_write(ISC_LOGCATEGORY_GENERAL,
                                      ISC_LOGMODULE_NETMGR, ISC_LOG_DEBUG(1),
                                      "TCP Reset (RST) failed: %s",
                                      uv_strerror(r));
@@ -2550,7 +2550,7 @@ isc__nmsocket_log_tls_session_reuse(isc_nmsocket_t *sock, isc_tls_t *tls) {
 
        REQUIRE(tls != NULL);
 
-       if (!isc_log_wouldlog(isc_lctx, log_level)) {
+       if (!isc_log_wouldlog(log_level)) {
                return;
        };
 
@@ -2588,7 +2588,7 @@ isc__netmgr_log(const isc_nm_t *netmgr, int level, const char *fmt, ...) {
        char msgbuf[2048];
        va_list ap;
 
-       if (!isc_log_wouldlog(isc_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -2596,8 +2596,8 @@ isc__netmgr_log(const isc_nm_t *netmgr, int level, const char *fmt, ...) {
        vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
        va_end(ap);
 
-       isc_log_write(isc_lctx, ISC_LOGCATEGORY_DEFAULT, ISC_LOGMODULE_NETMGR,
-                     level, "netmgr %p: %s", netmgr, msgbuf);
+       isc_log_write(ISC_LOGCATEGORY_DEFAULT, ISC_LOGMODULE_NETMGR, level,
+                     "netmgr %p: %s", netmgr, msgbuf);
 }
 
 void
@@ -2605,7 +2605,7 @@ isc__nmsocket_log(const isc_nmsocket_t *sock, int level, const char *fmt, ...) {
        char msgbuf[2048];
        va_list ap;
 
-       if (!isc_log_wouldlog(isc_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -2613,8 +2613,8 @@ isc__nmsocket_log(const isc_nmsocket_t *sock, int level, const char *fmt, ...) {
        vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
        va_end(ap);
 
-       isc_log_write(isc_lctx, ISC_LOGCATEGORY_DEFAULT, ISC_LOGMODULE_NETMGR,
-                     level, "socket %p: %s", sock, msgbuf);
+       isc_log_write(ISC_LOGCATEGORY_DEFAULT, ISC_LOGMODULE_NETMGR, level,
+                     "socket %p: %s", sock, msgbuf);
 }
 
 void
@@ -2623,7 +2623,7 @@ isc__nmhandle_log(const isc_nmhandle_t *handle, int level, const char *fmt,
        char msgbuf[2048];
        va_list ap;
 
-       if (!isc_log_wouldlog(isc_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -2650,7 +2650,7 @@ isc__nm_received_proxy_header_log(isc_nmhandle_t *handle,
        const char *real_addresses_msg =
                "real source and destination addresses are used";
 
-       if (!isc_log_wouldlog(isc_lctx, log_level)) {
+       if (!isc_log_wouldlog(log_level)) {
                return;
        }
 
@@ -2673,9 +2673,8 @@ isc__nm_received_proxy_header_log(isc_nmhandle_t *handle,
                       real_peer_fmt, real_local_fmt, proto);
 
        if (cmd == ISC_PROXY2_CMD_LOCAL) {
-               isc_log_write(isc_lctx, ISC_LOGCATEGORY_DEFAULT,
-                             ISC_LOGMODULE_NETMGR, log_level,
-                             "%s: command: LOCAL (%s)", common_msg,
+               isc_log_write(ISC_LOGCATEGORY_DEFAULT, ISC_LOGMODULE_NETMGR,
+                             log_level, "%s: command: LOCAL (%s)", common_msg,
                              real_addresses_msg);
                return;
        } else if (cmd == ISC_PROXY2_CMD_PROXY) {
@@ -2687,7 +2686,7 @@ isc__nm_received_proxy_header_log(isc_nmhandle_t *handle,
 
                switch (socktype) {
                case 0:
-                       isc_log_write(isc_lctx, ISC_LOGCATEGORY_DEFAULT,
+                       isc_log_write(ISC_LOGCATEGORY_DEFAULT,
                                      ISC_LOGMODULE_NETMGR, log_level,
                                      "%s: command: PROXY (unspecified address "
                                      "and socket type, %s)",
@@ -2715,8 +2714,8 @@ isc__nm_received_proxy_header_log(isc_nmhandle_t *handle,
                        dst_addr_msg = dst_addr_fmt;
                }
 
-               isc_log_write(isc_lctx, ISC_LOGCATEGORY_DEFAULT,
-                             ISC_LOGMODULE_NETMGR, log_level,
+               isc_log_write(ISC_LOGCATEGORY_DEFAULT, ISC_LOGMODULE_NETMGR,
+                             log_level,
                              "%s: command: PROXY, socket type: %s, source: "
                              "%s, destination: %s, TLVs: %s",
                              common_msg, socktype_name, src_addr_msg,
index 5b475bbebc0d47ec7fd543ca2f34108878f6a467..c106968c264160da52ee69437d8adfe0ea12f257 100644 (file)
@@ -1168,7 +1168,7 @@ tcp_send_direct(isc_nmsocket_t *sock, isc__nm_uvreq_t *req) {
                }
        }
 
-       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_NETMGR,
+       isc_log_write(ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_NETMGR,
                      ISC_LOG_DEBUG(3),
                      "throttling TCP connection, the other side is not "
                      "reading the data, switching to uv_write()");
index 55e7f206de2d7ac12ff3878a8839160be35cabe8..825cce13b5379233d0bbe93086f3aa99dd48d7f8 100644 (file)
@@ -222,7 +222,7 @@ isc_tlsctx_attach(isc_tlsctx_t *src, isc_tlsctx_t **ptarget) {
  */
 static void
 sslkeylogfile_append(const SSL *ssl ISC_ATTR_UNUSED, const char *line) {
-       isc_log_write(isc_lctx, ISC_LOGCATEGORY_SSLKEYLOG, ISC_LOGMODULE_NETMGR,
+       isc_log_write(ISC_LOGCATEGORY_SSLKEYLOG, ISC_LOGMODULE_NETMGR,
                      ISC_LOG_INFO, "%s", line);
 }
 
@@ -269,7 +269,7 @@ isc_tlsctx_createclient(isc_tlsctx_t **ctxp) {
 ssl_error:
        err = ERR_get_error();
        ERR_error_string_n(err, errbuf, sizeof(errbuf));
-       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_NETMGR,
+       isc_log_write(ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_NETMGR,
                      ISC_LOG_ERROR, "Error initializing TLS context: %s",
                      errbuf);
 
@@ -469,7 +469,7 @@ isc_tlsctx_createserver(const char *keyfile, const char *certfile,
 ssl_error:
        err = ERR_get_error();
        ERR_error_string_n(err, errbuf, sizeof(errbuf));
-       isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_NETMGR,
+       isc_log_write(ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_NETMGR,
                      ISC_LOG_ERROR, "Error initializing TLS context: %s",
                      errbuf);
 
@@ -1696,7 +1696,7 @@ isc__tlserr2result(isc_logcategory_t *category, isc_logmodule_t *module,
                goto done;
        }
 
-       isc_log_write(isc_lctx, category, module, ISC_LOG_WARNING,
+       isc_log_write(category, module, ISC_LOG_WARNING,
                      "%s (%s:%d) failed (%s)", funcname, file, line,
                      isc_result_totext(result));
 
@@ -1716,8 +1716,8 @@ isc__tlserr2result(isc_logcategory_t *category, isc_logmodule_t *module,
                char buf[256];
                ERR_error_string_n(err, buf, sizeof(buf));
 
-               isc_log_write(isc_lctx, category, module, ISC_LOG_INFO,
-                             "%s:%s:%d:%s", buf, file, line,
+               isc_log_write(category, module, ISC_LOG_INFO, "%s:%s:%d:%s",
+                             buf, file, line,
                              ((flags & ERR_TXT_STRING) != 0) ? data : "");
        }
 
index e2b5b065b49a92db5e7a7e2a93cfe1d5d8b68585..ebe18b6dbe9f3e489d0434bd2e4e733ea9561314 100644 (file)
@@ -118,7 +118,7 @@ get_acl_def(const cfg_obj_t *cctx, const char *name, const cfg_obj_t **ret) {
 
 static isc_result_t
 convert_named_acl(const cfg_obj_t *nameobj, const cfg_obj_t *cctx,
-                 isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
+                 cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
                  unsigned int nest_level, dns_acl_t **target) {
        isc_result_t result;
        const cfg_obj_t *cacl = NULL;
@@ -132,7 +132,7 @@ convert_named_acl(const cfg_obj_t *nameobj, const cfg_obj_t *cctx,
        {
                if (strcasecmp(aclname, dacl->name) == 0) {
                        if (ISC_MAGIC_VALID(dacl, LOOP_MAGIC)) {
-                               cfg_obj_log(nameobj, lctx, ISC_LOG_ERROR,
+                               cfg_obj_log(nameobj, ISC_LOG_ERROR,
                                            "acl loop detected: %s", aclname);
                                return (ISC_R_FAILURE);
                        }
@@ -143,8 +143,8 @@ convert_named_acl(const cfg_obj_t *nameobj, const cfg_obj_t *cctx,
        /* Not yet converted.  Convert now. */
        result = get_acl_def(cctx, aclname, &cacl);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(nameobj, lctx, ISC_LOG_WARNING,
-                           "undefined ACL '%s'", aclname);
+               cfg_obj_log(nameobj, ISC_LOG_WARNING, "undefined ACL '%s'",
+                           aclname);
                return (result);
        }
        /*
@@ -155,8 +155,7 @@ convert_named_acl(const cfg_obj_t *nameobj, const cfg_obj_t *cctx,
        loop.name = UNCONST(aclname);
        loop.magic = LOOP_MAGIC;
        ISC_LIST_APPEND(ctx->named_acl_cache, &loop, nextincache);
-       result = cfg_acl_fromconfig(cacl, cctx, lctx, ctx, mctx, nest_level,
-                                   &dacl);
+       result = cfg_acl_fromconfig(cacl, cctx, ctx, mctx, nest_level, &dacl);
        ISC_LIST_UNLINK(ctx->named_acl_cache, &loop, nextincache);
        loop.magic = 0;
        loop.name = NULL;
@@ -170,8 +169,7 @@ convert_named_acl(const cfg_obj_t *nameobj, const cfg_obj_t *cctx,
 }
 
 static isc_result_t
-convert_keyname(const cfg_obj_t *keyobj, isc_log_t *lctx, isc_mem_t *mctx,
-               dns_name_t *dnsname) {
+convert_keyname(const cfg_obj_t *keyobj, isc_mem_t *mctx, dns_name_t *dnsname) {
        isc_result_t result;
        isc_buffer_t buf;
        dns_fixedname_t fixname;
@@ -185,7 +183,7 @@ convert_keyname(const cfg_obj_t *keyobj, isc_log_t *lctx, isc_mem_t *mctx,
        result = dns_name_fromtext(dns_fixedname_name(&fixname), &buf,
                                   dns_rootname, 0, NULL);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(keyobj, lctx, ISC_LOG_WARNING,
+               cfg_obj_log(keyobj, ISC_LOG_WARNING,
                            "key name '%s' is not a valid domain name",
                            txtname);
                return (result);
@@ -203,8 +201,8 @@ convert_keyname(const cfg_obj_t *keyobj, isc_log_t *lctx, isc_mem_t *mctx,
  */
 static isc_result_t
 count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx,
-                  isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
-                  uint32_t *count, bool *has_negative) {
+                  cfg_aclconfctx_t *ctx, isc_mem_t *mctx, uint32_t *count,
+                  bool *has_negative) {
        const cfg_listelt_t *elt;
        isc_result_t result;
        uint32_t n = 0;
@@ -235,8 +233,8 @@ count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                } else if (cfg_obj_islist(ce)) {
                        bool negative;
                        uint32_t sub;
-                       result = count_acl_elements(ce, cctx, lctx, ctx, mctx,
-                                                   &sub, &negative);
+                       result = count_acl_elements(ce, cctx, ctx, mctx, &sub,
+                                                   &negative);
                        if (result != ISC_R_SUCCESS) {
                                return (result);
                        }
@@ -263,8 +261,8 @@ count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx,
                                 * Convert any named acls we reference now if
                                 * they have not already been converted.
                                 */
-                               result = convert_named_acl(ce, cctx, lctx, ctx,
-                                                          mctx, 0, &inneracl);
+                               result = convert_named_acl(ce, cctx, ctx, mctx,
+                                                          0, &inneracl);
                                if (result == ISC_R_SUCCESS) {
                                        if (inneracl->has_negatives) {
                                                n++;
@@ -285,7 +283,7 @@ count_acl_elements(const cfg_obj_t *caml, const cfg_obj_t *cctx,
 
 #if defined(HAVE_GEOIP2)
 static dns_geoip_subtype_t
-get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype,
+get_subtype(const cfg_obj_t *obj, dns_geoip_subtype_t subtype,
            const char *dbname) {
        if (dbname == NULL) {
                return (subtype);
@@ -298,7 +296,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype,
                } else if (strcasecmp(dbname, "country") == 0) {
                        return (dns_geoip_country_code);
                }
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "invalid database specified for "
                            "country search: ignored");
                return (subtype);
@@ -308,7 +306,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype,
                } else if (strcasecmp(dbname, "country") == 0) {
                        return (dns_geoip_country_name);
                }
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "invalid database specified for "
                            "country search: ignored");
                return (subtype);
@@ -318,7 +316,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype,
                } else if (strcasecmp(dbname, "country") == 0) {
                        return (dns_geoip_country_continentcode);
                }
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "invalid database specified for "
                            "continent search: ignored");
                return (subtype);
@@ -328,7 +326,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype,
                } else if (strcasecmp(dbname, "country") == 0) {
                        return (dns_geoip_country_continent);
                }
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "invalid database specified for "
                            "continent search: ignored");
                return (subtype);
@@ -336,7 +334,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype,
                if (strcasecmp(dbname, "city") == 0) {
                        return (dns_geoip_city_region);
                }
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "invalid database specified for "
                            "region/subdivision search: ignored");
                return (subtype);
@@ -344,7 +342,7 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype,
                if (strcasecmp(dbname, "city") == 0) {
                        return (dns_geoip_city_regionname);
                }
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "invalid database specified for "
                            "region/subdivision search: ignored");
                return (subtype);
@@ -359,42 +357,42 @@ get_subtype(const cfg_obj_t *obj, isc_log_t *lctx, dns_geoip_subtype_t subtype,
        case dns_geoip_city_areacode:
        case dns_geoip_city_timezonecode:
                if (strcasecmp(dbname, "city") != 0) {
-                       cfg_obj_log(obj, lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "invalid database specified for "
                                    "a 'city'-only search type: ignoring");
                }
                return (subtype);
        case dns_geoip_isp_name:
                if (strcasecmp(dbname, "isp") != 0) {
-                       cfg_obj_log(obj, lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "invalid database specified for "
                                    "an 'isp' search: ignoring");
                }
                return (subtype);
        case dns_geoip_org_name:
                if (strcasecmp(dbname, "org") != 0) {
-                       cfg_obj_log(obj, lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "invalid database specified for "
                                    "an 'org' search: ignoring");
                }
                return (subtype);
        case dns_geoip_as_asnum:
                if (strcasecmp(dbname, "asnum") != 0) {
-                       cfg_obj_log(obj, lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "invalid database specified for "
                                    "an 'asnum' search: ignoring");
                }
                return (subtype);
        case dns_geoip_domain_name:
                if (strcasecmp(dbname, "domain") != 0) {
-                       cfg_obj_log(obj, lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "invalid database specified for "
                                    "a 'domain' search: ignoring");
                }
                return (subtype);
        case dns_geoip_netspeed_id:
                if (strcasecmp(dbname, "netspeed") != 0) {
-                       cfg_obj_log(obj, lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "invalid database specified for "
                                    "a 'netspeed' search: ignoring");
                }
@@ -469,8 +467,8 @@ geoip_can_answer(dns_aclelement_t *elt, cfg_aclconfctx_t *ctx) {
 }
 
 static isc_result_t
-parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
-                   cfg_aclconfctx_t *ctx, dns_aclelement_t *dep) {
+parse_geoip_element(const cfg_obj_t *obj, cfg_aclconfctx_t *ctx,
+                   dns_aclelement_t *dep) {
        const cfg_obj_t *ge;
        const char *dbname = NULL;
        const char *stype = NULL, *search = NULL;
@@ -494,7 +492,7 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
                        }
                }
                if (geoip_dbnames[i] == NULL) {
-                       cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "database '%s' is not defined for GeoIP2",
                                    dbname);
                        return (ISC_R_UNEXPECTED);
@@ -506,7 +504,7 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
        len = strlen(search);
 
        if (len == 0) {
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "zero-length geoip search field");
                return (ISC_R_FAILURE);
        }
@@ -518,7 +516,7 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
                        sizeof(de.geoip_elem.as_string));
        } else if (strcasecmp(stype, "country") == 0 && len == 3) {
                /* Three-letter country code */
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "three-letter country codes are unavailable "
                            "in GeoIP2 databases");
                return (ISC_R_FAILURE);
@@ -564,7 +562,7 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
                        strlcpy(de.geoip_elem.as_string, search,
                                sizeof(de.geoip_elem.as_string));
                } else {
-                       cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "geoiop postal code (%s) too long", search);
                        return (ISC_R_FAILURE);
                }
@@ -596,17 +594,17 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
                strlcpy(de.geoip_elem.as_string, search,
                        sizeof(de.geoip_elem.as_string));
        } else {
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "type '%s' is unavailable "
                            "in GeoIP2 databases",
                            stype);
                return (ISC_R_FAILURE);
        }
 
-       de.geoip_elem.subtype = get_subtype(obj, lctx, subtype, dbname);
+       de.geoip_elem.subtype = get_subtype(obj, subtype, dbname);
 
        if (!geoip_can_answer(&de, ctx)) {
-               cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "no GeoIP2 database installed which can answer "
                            "queries of type '%s'",
                            stype);
@@ -621,7 +619,7 @@ parse_geoip_element(const cfg_obj_t *obj, isc_log_t *lctx,
 
 isc_result_t
 cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
-                  isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
+                  cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
                   unsigned int nest_level, dns_acl_t **target) {
        isc_result_t result;
        dns_acl_t *dacl = NULL, *inneracl = NULL;
@@ -676,7 +674,7 @@ cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                uint32_t nelem;
 
                if (nest_level == 0) {
-                       result = count_acl_elements(caml, cctx, lctx, ctx, mctx,
+                       result = count_acl_elements(caml, cctx, ctx, mctx,
                                                    &nelem, NULL);
                        if (result != ISC_R_SUCCESS) {
                                return (result);
@@ -785,7 +783,7 @@ cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                        if (result != ISC_R_SUCCESS) {
                                char buf[ISC_NETADDR_FORMATSIZE + 1];
                                isc_netaddr_format(&addr, buf, sizeof(buf));
-                               cfg_obj_log(ce, lctx, ISC_LOG_ERROR,
+                               cfg_obj_log(ce, ISC_LOG_ERROR,
                                            "'%s/%u': address/prefix length "
                                            "mismatch",
                                            buf, bitlen);
@@ -821,7 +819,7 @@ cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                        if (inneracl != NULL) {
                                dns_acl_detach(&inneracl);
                        }
-                       result = cfg_acl_fromconfig(ce, cctx, lctx, ctx, mctx,
+                       result = cfg_acl_fromconfig(ce, cctx, ctx, mctx,
                                                    new_nest_level, &inneracl);
                        if (result != ISC_R_SUCCESS) {
                                goto cleanup;
@@ -858,7 +856,7 @@ cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                        de->type = dns_aclelementtype_keyname;
                        de->negative = neg;
                        dns_name_init(&de->keyname, NULL);
-                       result = convert_keyname(ce, lctx, mctx, &de->keyname);
+                       result = convert_keyname(ce, mctx, &de->keyname);
                        if (result != ISC_R_SUCCESS) {
                                goto cleanup;
                        }
@@ -867,7 +865,7 @@ cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                           cfg_obj_isvoid(cfg_tuple_get(ce, "negated")))
                {
                        INSIST(dacl->length < dacl->alloc);
-                       result = parse_geoip_element(ce, lctx, ctx, de);
+                       result = parse_geoip_element(ce, ctx, de);
                        if (result != ISC_R_SUCCESS) {
                                goto cleanup;
                        }
@@ -935,8 +933,8 @@ cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                                 * This call should just find the cached
                                 * of the named acl.
                                 */
-                               result = convert_named_acl(ce, cctx, lctx, ctx,
-                                                          mctx, new_nest_level,
+                               result = convert_named_acl(ce, cctx, ctx, mctx,
+                                                          new_nest_level,
                                                           &inneracl);
                                if (result != ISC_R_SUCCESS) {
                                        goto cleanup;
@@ -945,7 +943,7 @@ cfg_acl_fromconfig(const cfg_obj_t *acl_data, const cfg_obj_t *cctx,
                                goto nested_acl;
                        }
                } else {
-                       cfg_obj_log(ce, lctx, ISC_LOG_WARNING,
+                       cfg_obj_log(ce, ISC_LOG_WARNING,
                                    "address match list contains "
                                    "unsupported element type");
                        result = ISC_R_FAILURE;
index 1bc045d33ae45781a261a10f25ed3947ce7f4934..f5fa78e14a6a4713c2eb49353a32c1f5afc0560e 100644 (file)
 static in_port_t dnsport = 53;
 
 static isc_result_t
-fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable,
-         isc_log_t *logctxlogc);
+fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable);
 
 static isc_result_t
 keydirexist(const cfg_obj_t *zcgf, const char *optname, dns_name_t *zname,
            const char *dirname, const char *kaspnamestr, isc_symtab_t *symtab,
-           isc_log_t *logctx, isc_mem_t *mctx);
+           isc_mem_t *mctx);
 
 static const cfg_obj_t *
 find_maplist(const cfg_obj_t *config, const char *listname, const char *name);
@@ -93,7 +92,7 @@ freekey(char *key, unsigned int type, isc_symvalue_t value, void *userarg) {
 }
 
 static isc_result_t
-check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
+check_orderent(const cfg_obj_t *ent) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
        isc_textregion_t r;
@@ -111,7 +110,7 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
                r.length = strlen(r.base);
                tresult = dns_rdataclass_fromtext(&rdclass, &r);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "rrset-order: invalid class '%s'", r.base);
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_FAILURE;
@@ -125,7 +124,7 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
                r.length = strlen(r.base);
                tresult = dns_rdatatype_fromtext(&rdtype, &r);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "rrset-order: invalid type '%s'", r.base);
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_FAILURE;
@@ -141,7 +140,7 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
                tresult = dns_name_fromtext(dns_fixedname_name(&fixed), &b,
                                            dns_rootname, 0, NULL);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "rrset-order: invalid name '%s'", str);
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_FAILURE;
@@ -153,7 +152,7 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
        if (!cfg_obj_isstring(obj) ||
            strcasecmp("order", cfg_obj_asstring(obj)) != 0)
        {
-               cfg_obj_log(ent, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(ent, ISC_LOG_ERROR,
                            "rrset-order: keyword 'order' missing");
                if (result == ISC_R_SUCCESS) {
                        result = ISC_R_FAILURE;
@@ -162,7 +161,7 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
 
        obj = cfg_tuple_get(ent, "ordering");
        if (!cfg_obj_isstring(obj)) {
-               cfg_obj_log(ent, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(ent, ISC_LOG_ERROR,
                            "rrset-order: missing ordering");
                if (result == ISC_R_SUCCESS) {
                        result = ISC_R_FAILURE;
@@ -170,11 +169,11 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
        } else if (strcasecmp(cfg_obj_asstring(obj), "fixed") == 0) {
 #if DNS_RDATASET_FIXED
                if ((ent->pctx->flags & CFG_PCTX_NODEPRECATED) == 0) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "rrset-order: order 'fixed' is deprecated");
                }
 #else
-               cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+               cfg_obj_log(obj, ISC_LOG_WARNING,
                            "rrset-order: order 'fixed' was disabled at "
                            "compilation time");
 #endif /* if !DNS_RDATASET_FIXED */
@@ -182,7 +181,7 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
                   strcasecmp(cfg_obj_asstring(obj), "cyclic") != 0 &&
                   strcasecmp(cfg_obj_asstring(obj), "none") != 0)
        {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "rrset-order: invalid order '%s'",
                            cfg_obj_asstring(obj));
                if (result == ISC_R_SUCCESS) {
@@ -193,7 +192,7 @@ check_orderent(const cfg_obj_t *ent, isc_log_t *logctx) {
 }
 
 static isc_result_t
-check_order(const cfg_obj_t *options, isc_log_t *logctx) {
+check_order(const cfg_obj_t *options) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
        const cfg_listelt_t *element;
@@ -206,7 +205,7 @@ check_order(const cfg_obj_t *options, isc_log_t *logctx) {
        for (element = cfg_list_first(obj); element != NULL;
             element = cfg_list_next(element))
        {
-               tresult = check_orderent(cfg_listelt_value(element), logctx);
+               tresult = check_orderent(cfg_listelt_value(element));
                if (result == ISC_R_SUCCESS && tresult != ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -215,7 +214,7 @@ check_order(const cfg_obj_t *options, isc_log_t *logctx) {
 }
 
 static isc_result_t
-check_dual_stack(const cfg_obj_t *options, isc_log_t *logctx) {
+check_dual_stack(const cfg_obj_t *options) {
        const cfg_listelt_t *element;
        const cfg_obj_t *alternates = NULL;
        const cfg_obj_t *value;
@@ -237,7 +236,7 @@ check_dual_stack(const cfg_obj_t *options, isc_log_t *logctx) {
        if (cfg_obj_isuint32(obj)) {
                uint32_t val = cfg_obj_asuint32(obj);
                if (val > UINT16_MAX) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "port '%u' out of range", val);
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_RANGE;
@@ -260,8 +259,7 @@ check_dual_stack(const cfg_obj_t *options, isc_log_t *logctx) {
                tresult = dns_name_fromtext(name, &buffer, dns_rootname, 0,
                                            NULL);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR, "bad name '%s'",
-                                   str);
+                       cfg_obj_log(obj, ISC_LOG_ERROR, "bad name '%s'", str);
                        if (result == ISC_R_SUCCESS) {
                                result = tresult;
                        }
@@ -270,7 +268,7 @@ check_dual_stack(const cfg_obj_t *options, isc_log_t *logctx) {
                if (cfg_obj_isuint32(obj)) {
                        uint32_t val = cfg_obj_asuint32(obj);
                        if (val > UINT16_MAX) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "port '%u' out of range", val);
                                if (result == ISC_R_SUCCESS) {
                                        result = ISC_R_RANGE;
@@ -282,16 +280,15 @@ check_dual_stack(const cfg_obj_t *options, isc_log_t *logctx) {
 }
 
 static isc_result_t
-validate_tls(const cfg_obj_t *config, const cfg_obj_t *obj, isc_log_t *logctx,
-            const char *str) {
+validate_tls(const cfg_obj_t *config, const cfg_obj_t *obj, const char *str) {
        dns_fixedname_t fname;
        dns_name_t *nm = dns_fixedname_initname(&fname);
        isc_result_t result = dns_name_fromstring(nm, str, dns_rootname, 0,
                                                  NULL);
 
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
-                           "'%s' is not a valid name", str);
+               cfg_obj_log(obj, ISC_LOG_ERROR, "'%s' is not a valid name",
+                           str);
                return (result);
        }
 
@@ -299,7 +296,7 @@ validate_tls(const cfg_obj_t *config, const cfg_obj_t *obj, isc_log_t *logctx,
                const cfg_obj_t *tlsmap = find_maplist(config, "tls", str);
 
                if (tlsmap == NULL) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "tls '%s' is not defined", str);
                        return (ISC_R_FAILURE);
                }
@@ -310,7 +307,7 @@ validate_tls(const cfg_obj_t *config, const cfg_obj_t *obj, isc_log_t *logctx,
 
 static isc_result_t
 check_forward(const cfg_obj_t *config, const cfg_obj_t *options,
-             const cfg_obj_t *global, isc_log_t *logctx) {
+             const cfg_obj_t *global) {
        const cfg_obj_t *forward = NULL;
        const cfg_obj_t *forwarders = NULL;
        const cfg_obj_t *faddresses = NULL;
@@ -322,14 +319,14 @@ check_forward(const cfg_obj_t *config, const cfg_obj_t *options,
        if (forwarders != NULL && global != NULL) {
                const char *file = cfg_obj_file(global);
                unsigned int line = cfg_obj_line(global);
-               cfg_obj_log(forwarders, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(forwarders, ISC_LOG_ERROR,
                            "forwarders declared in root zone and "
                            "in general configuration: %s:%u",
                            file, line);
                return (ISC_R_FAILURE);
        }
        if (forward != NULL && forwarders == NULL) {
-               cfg_obj_log(forward, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(forward, ISC_LOG_ERROR,
                            "no matching 'forwarders' statement");
                return (ISC_R_FAILURE);
        }
@@ -340,8 +337,7 @@ check_forward(const cfg_obj_t *config, const cfg_obj_t *options,
                if (tlspobj != NULL && cfg_obj_isstring(tlspobj)) {
                        const char *tls = cfg_obj_asstring(tlspobj);
                        if (tls != NULL) {
-                               result = validate_tls(config, tlspobj, logctx,
-                                                     tls);
+                               result = validate_tls(config, tlspobj, tls);
                                if (result != ISC_R_SUCCESS) {
                                        return (result);
                                }
@@ -355,8 +351,7 @@ check_forward(const cfg_obj_t *config, const cfg_obj_t *options,
                        const cfg_obj_t *forwarder = cfg_listelt_value(element);
                        const char *tls = cfg_obj_getsockaddrtls(forwarder);
                        if (tls != NULL) {
-                               result = validate_tls(config, faddresses,
-                                                     logctx, tls);
+                               result = validate_tls(config, faddresses, tls);
                                if (result != ISC_R_SUCCESS) {
                                        return (result);
                                }
@@ -368,7 +363,7 @@ check_forward(const cfg_obj_t *config, const cfg_obj_t *options,
 }
 
 static isc_result_t
-disabled_algorithms(const cfg_obj_t *disabled, isc_log_t *logctx) {
+disabled_algorithms(const cfg_obj_t *disabled) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
        const cfg_listelt_t *element;
@@ -385,8 +380,7 @@ disabled_algorithms(const cfg_obj_t *disabled, isc_log_t *logctx) {
        isc_buffer_add(&b, strlen(str));
        tresult = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
        if (tresult != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR, "bad domain name '%s'",
-                           str);
+               cfg_obj_log(obj, ISC_LOG_ERROR, "bad domain name '%s'", str);
                result = tresult;
        }
 
@@ -403,9 +397,8 @@ disabled_algorithms(const cfg_obj_t *disabled, isc_log_t *logctx) {
 
                tresult = dns_secalg_fromtext(&alg, &r);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(cfg_listelt_value(element), logctx,
-                                   ISC_LOG_ERROR, "invalid algorithm '%s'",
-                                   r.base);
+                       cfg_obj_log(cfg_listelt_value(element), ISC_LOG_ERROR,
+                                   "invalid algorithm '%s'", r.base);
                        result = tresult;
                }
        }
@@ -413,7 +406,7 @@ disabled_algorithms(const cfg_obj_t *disabled, isc_log_t *logctx) {
 }
 
 static isc_result_t
-disabled_ds_digests(const cfg_obj_t *disabled, isc_log_t *logctx) {
+disabled_ds_digests(const cfg_obj_t *disabled) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
        const cfg_listelt_t *element;
@@ -430,8 +423,7 @@ disabled_ds_digests(const cfg_obj_t *disabled, isc_log_t *logctx) {
        isc_buffer_add(&b, strlen(str));
        tresult = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
        if (tresult != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR, "bad domain name '%s'",
-                           str);
+               cfg_obj_log(obj, ISC_LOG_ERROR, "bad domain name '%s'", str);
                result = tresult;
        }
 
@@ -449,9 +441,8 @@ disabled_ds_digests(const cfg_obj_t *disabled, isc_log_t *logctx) {
                /* works with a numeric argument too */
                tresult = dns_dsdigest_fromtext(&digest, &r);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(cfg_listelt_value(element), logctx,
-                                   ISC_LOG_ERROR, "invalid digest type '%s'",
-                                   r.base);
+                       cfg_obj_log(cfg_listelt_value(element), ISC_LOG_ERROR,
+                                   "invalid digest type '%s'", r.base);
                        result = tresult;
                }
        }
@@ -460,7 +451,7 @@ disabled_ds_digests(const cfg_obj_t *disabled, isc_log_t *logctx) {
 
 static isc_result_t
 exists(const cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
-       const char *fmt, isc_log_t *logctx, isc_mem_t *mctx) {
+       const char *fmt, isc_mem_t *mctx) {
        char *key;
        const char *file;
        unsigned int line;
@@ -480,7 +471,7 @@ exists(const cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
                if (file == NULL) {
                        file = "<unknown file>";
                }
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR, fmt, key, file, line);
+               cfg_obj_log(obj, ISC_LOG_ERROR, fmt, key, file, line);
                isc_mem_free(mctx, key);
                result = ISC_R_EXISTS;
        }
@@ -488,8 +479,7 @@ exists(const cfg_obj_t *obj, const char *name, int value, isc_symtab_t *symtab,
 }
 
 static isc_result_t
-mustbesecure(const cfg_obj_t *secure, isc_symtab_t *symtab, isc_log_t *logctx,
-            isc_mem_t *mctx) {
+mustbesecure(const cfg_obj_t *secure, isc_symtab_t *symtab, isc_mem_t *mctx) {
        const cfg_obj_t *obj;
        char namebuf[DNS_NAME_FORMATSIZE];
        const char *str;
@@ -505,22 +495,20 @@ mustbesecure(const cfg_obj_t *secure, isc_symtab_t *symtab, isc_log_t *logctx,
        isc_buffer_add(&b, strlen(str));
        result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR, "bad domain name '%s'",
-                           str);
+               cfg_obj_log(obj, ISC_LOG_ERROR, "bad domain name '%s'", str);
        } else {
                dns_name_format(name, namebuf, sizeof(namebuf));
                result = exists(secure, namebuf, 1, symtab,
                                "dnssec-must-be-secure '%s': already exists "
                                "previous definition: %s:%u",
-                               logctx, mctx);
+                               mctx);
        }
        return (result);
 }
 
 static isc_result_t
 checkacl(const char *aclname, cfg_aclconfctx_t *actx, const cfg_obj_t *zconfig,
-        const cfg_obj_t *voptions, const cfg_obj_t *config, isc_log_t *logctx,
-        isc_mem_t *mctx) {
+        const cfg_obj_t *voptions, const cfg_obj_t *config, isc_mem_t *mctx) {
        isc_result_t result;
        const cfg_obj_t *aclobj = NULL;
        const cfg_obj_t *options;
@@ -543,8 +531,7 @@ checkacl(const char *aclname, cfg_aclconfctx_t *actx, const cfg_obj_t *zconfig,
        if (aclobj == NULL) {
                return (ISC_R_SUCCESS);
        }
-       result = cfg_acl_fromconfig(aclobj, config, logctx, actx, mctx, 0,
-                                   &acl);
+       result = cfg_acl_fromconfig(aclobj, config, actx, mctx, 0, &acl);
        if (acl != NULL) {
                dns_acl_detach(&acl);
        }
@@ -560,7 +547,7 @@ checkacl(const char *aclname, cfg_aclconfctx_t *actx, const cfg_obj_t *zconfig,
                if (cfg_obj_isuint32(obj_port) &&
                    cfg_obj_asuint32(obj_port) >= UINT16_MAX)
                {
-                       cfg_obj_log(obj_port, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj_port, ISC_LOG_ERROR,
                                    "port value '%u' is out of range",
 
                                    cfg_obj_asuint32(obj_port));
@@ -580,7 +567,7 @@ checkacl(const char *aclname, cfg_aclconfctx_t *actx, const cfg_obj_t *zconfig,
                        }
 
                        if (!found) {
-                               cfg_obj_log(obj_proto, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj_proto, ISC_LOG_ERROR,
                                            "'%s' is not a valid transport "
                                            "protocol for "
                                            "zone "
@@ -596,7 +583,7 @@ checkacl(const char *aclname, cfg_aclconfctx_t *actx, const cfg_obj_t *zconfig,
 
 static isc_result_t
 check_viewacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
-              const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
+              const cfg_obj_t *config, isc_mem_t *mctx) {
        isc_result_t result = ISC_R_SUCCESS, tresult;
        int i = 0;
 
@@ -614,7 +601,7 @@ check_viewacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
 
        while (acls[i] != NULL) {
                tresult = checkacl(acls[i++], actx, NULL, voptions, config,
-                                  logctx, mctx);
+                                  mctx);
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -623,17 +610,17 @@ check_viewacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
 }
 
 static void
-dns64_error(const cfg_obj_t *obj, isc_log_t *logctx, isc_netaddr_t *netaddr,
+dns64_error(const cfg_obj_t *obj, isc_netaddr_t *netaddr,
            unsigned int prefixlen, const char *message) {
        char buf[ISC_NETADDR_FORMATSIZE + 1];
        isc_netaddr_format(netaddr, buf, sizeof(buf));
-       cfg_obj_log(obj, logctx, ISC_LOG_ERROR, "dns64 prefix %s/%u %s", buf,
-                   prefixlen, message);
+       cfg_obj_log(obj, ISC_LOG_ERROR, "dns64 prefix %s/%u %s", buf, prefixlen,
+                   message);
 }
 
 static isc_result_t
 check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
-           const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
+           const cfg_obj_t *config, isc_mem_t *mctx) {
        isc_result_t result = ISC_R_SUCCESS;
        const cfg_obj_t *dns64 = NULL;
        const cfg_obj_t *options;
@@ -668,14 +655,13 @@ check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
 
                cfg_obj_asnetprefix(obj, &na, &prefixlen);
                if (na.family != AF_INET6) {
-                       dns64_error(map, logctx, &na, prefixlen,
-                                   "must be IPv6");
+                       dns64_error(map, &na, prefixlen, "must be IPv6");
                        result = ISC_R_FAILURE;
                        continue;
                }
 
                if (na.type.in6.s6_addr[8] != 0) {
-                       dns64_error(map, logctx, &na, prefixlen,
+                       dns64_error(map, &na, prefixlen,
                                    "bits [64..71] must be zero");
                        result = ISC_R_FAILURE;
                        continue;
@@ -684,7 +670,7 @@ check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                if (prefixlen != 32 && prefixlen != 40 && prefixlen != 48 &&
                    prefixlen != 56 && prefixlen != 64 && prefixlen != 96)
                {
-                       dns64_error(map, logctx, &na, prefixlen,
+                       dns64_error(map, &na, prefixlen,
                                    "length is not 32/40/48/56/64/96");
                        result = ISC_R_FAILURE;
                        continue;
@@ -697,9 +683,8 @@ check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                                dns_acl_t *acl = NULL;
                                isc_result_t tresult;
 
-                               tresult = cfg_acl_fromconfig(obj, config,
-                                                            logctx, actx, mctx,
-                                                            0, &acl);
+                               tresult = cfg_acl_fromconfig(obj, config, actx,
+                                                            mctx, 0, &acl);
                                if (acl != NULL) {
                                        dns_acl_detach(&acl);
                                }
@@ -715,7 +700,7 @@ check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                        static const unsigned char zeros[16];
                        isc_netaddr_fromsockaddr(&sa, cfg_obj_assockaddr(obj));
                        if (sa.family != AF_INET6) {
-                               cfg_obj_log(map, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(map, ISC_LOG_ERROR,
                                            "dns64 requires a IPv6 suffix");
                                result = ISC_R_FAILURE;
                                continue;
@@ -728,7 +713,7 @@ check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                                char netaddrbuf[ISC_NETADDR_FORMATSIZE];
                                isc_netaddr_format(&sa, netaddrbuf,
                                                   sizeof(netaddrbuf));
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "bad suffix '%s' leading "
                                            "%u octets not zeros",
                                            netaddrbuf, nbytes);
@@ -740,14 +725,13 @@ check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
        return (result);
 }
 
-#define CHECK_RRL(cond, pat, val1, val2)                                   \
-       do {                                                               \
-               if (!(cond)) {                                             \
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR, pat, val1, \
-                                   val2);                                 \
-                       if (result == ISC_R_SUCCESS)                       \
-                               result = ISC_R_RANGE;                      \
-               }                                                          \
+#define CHECK_RRL(cond, pat, val1, val2)                                  \
+       do {                                                              \
+               if (!(cond)) {                                            \
+                       cfg_obj_log(obj, ISC_LOG_ERROR, pat, val1, val2); \
+                       if (result == ISC_R_SUCCESS)                      \
+                               result = ISC_R_RANGE;                     \
+               }                                                         \
        } while (0)
 
 #define CHECK_RRL_RATE(rate, def, max_rate, name)                          \
@@ -763,7 +747,7 @@ check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
 
 static isc_result_t
 check_ratelimit(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
-               const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
+               const cfg_obj_t *config, isc_mem_t *mctx) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t mresult;
        const cfg_obj_t *map = NULL;
@@ -865,8 +849,7 @@ check_ratelimit(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                dns_acl_t *acl = NULL;
                isc_result_t tresult;
 
-               tresult = cfg_acl_fromconfig(obj, config, logctx, actx, mctx, 0,
-                                            &acl);
+               tresult = cfg_acl_fromconfig(obj, config, actx, mctx, 0, &acl);
                if (acl != NULL) {
                        dns_acl_detach(&acl);
                }
@@ -879,8 +862,7 @@ check_ratelimit(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
 }
 
 static isc_result_t
-check_fetchlimit(const cfg_obj_t *voptions, const cfg_obj_t *config,
-                isc_log_t *logctx) {
+check_fetchlimit(const cfg_obj_t *voptions, const cfg_obj_t *config) {
        const cfg_obj_t *map = NULL;
        const cfg_obj_t *options = NULL;
        const cfg_obj_t *obj = NULL;
@@ -903,7 +885,7 @@ check_fetchlimit(const cfg_obj_t *voptions, const cfg_obj_t *config,
        obj = cfg_tuple_get(map, "low");
        low = (double)cfg_obj_asfixedpoint(obj) / 100.0;
        if (low < 0.0 || low > 1.0) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "fetch-quota-param low value (%0.1f) "
                            "out of range",
                            low);
@@ -913,7 +895,7 @@ check_fetchlimit(const cfg_obj_t *voptions, const cfg_obj_t *config,
        obj = cfg_tuple_get(map, "high");
        high = (double)cfg_obj_asfixedpoint(obj) / 100.0;
        if (high < 0.0 || high > 1.0) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "fetch-quota-param high value (%0.1f) "
                            "out of range",
                            high);
@@ -923,7 +905,7 @@ check_fetchlimit(const cfg_obj_t *voptions, const cfg_obj_t *config,
        obj = cfg_tuple_get(map, "discount");
        discount = (double)cfg_obj_asfixedpoint(obj) / 100.0;
        if (discount < 0.0 || discount > 1.0) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "fetch-quota-param discount value (%0.1f) "
                            "out of range",
                            discount);
@@ -940,7 +922,7 @@ check_fetchlimit(const cfg_obj_t *voptions, const cfg_obj_t *config,
 static isc_result_t
 check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                    const char *viewname, const cfg_obj_t *config,
-                   isc_log_t *logctx, isc_mem_t *mctx) {
+                   isc_mem_t *mctx) {
        const cfg_obj_t *options, *aclobj, *obj = NULL;
        dns_acl_t *acl = NULL;
        isc_result_t result = ISC_R_SUCCESS, tresult;
@@ -990,8 +972,8 @@ check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                        continue;
                }
 
-               tresult = cfg_acl_fromconfig(aclobj, config, logctx, actx, mctx,
-                                            0, &acl);
+               tresult = cfg_acl_fromconfig(aclobj, config, actx, mctx, 0,
+                                            &acl);
 
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
@@ -1002,7 +984,7 @@ check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
                }
 
                if (!recursion && !dns_acl_isnone(acl)) {
-                       cfg_obj_log(aclobj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(aclobj, ISC_LOG_WARNING,
                                    "both \"recursion no;\" and "
                                    "\"%s\" active%s%s",
                                    acls[i], forview, viewname);
@@ -1093,7 +1075,7 @@ find_maplist(const cfg_obj_t *config, const char *listname, const char *name) {
 
 static isc_result_t
 check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
-              cfg_aclconfctx_t *actx, isc_log_t *logctx, isc_mem_t *mctx) {
+              cfg_aclconfctx_t *actx, isc_mem_t *mctx) {
        isc_result_t tresult, result = ISC_R_SUCCESS;
        const cfg_obj_t *ltup = NULL;
        const cfg_obj_t *tlsobj = NULL, *httpobj = NULL;
@@ -1121,7 +1103,7 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
 
                        tlsmap = find_maplist(config, "tls", tlsname);
                        if (tlsmap == NULL) {
-                               cfg_obj_log(tlsobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(tlsobj, ISC_LOG_ERROR,
                                            "tls '%s' is not defined",
                                            cfg_obj_asstring(tlsobj));
                                result = ISC_R_FAILURE;
@@ -1134,7 +1116,7 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
                const char *httpname = cfg_obj_asstring(httpobj);
 
                if (!do_tls && !no_tls) {
-                       cfg_obj_log(httpobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(httpobj, ISC_LOG_ERROR,
                                    "http must specify a 'tls' "
                                    "statement, 'tls ephemeral', or "
                                    "'tls none'");
@@ -1144,7 +1126,7 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
                http_server = find_maplist(config, "http", httpname);
                if (http_server == NULL && strcasecmp(httpname, "default") != 0)
                {
-                       cfg_obj_log(httpobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(httpobj, ISC_LOG_ERROR,
                                    "http '%s' is not defined",
                                    cfg_obj_asstring(httpobj));
                        result = ISC_R_FAILURE;
@@ -1155,7 +1137,7 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
        if (cfg_obj_isuint32(portobj) &&
            cfg_obj_asuint32(portobj) >= UINT16_MAX)
        {
-               cfg_obj_log(portobj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(portobj, ISC_LOG_ERROR,
                            "port value '%u' is out of range",
 
                            cfg_obj_asuint32(portobj));
@@ -1171,7 +1153,7 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
                    (strcasecmp(proxyval, "encrypted") != 0 &&
                     strcasecmp(proxyval, "plain") != 0))
                {
-                       cfg_obj_log(proxyobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(proxyobj, ISC_LOG_ERROR,
                                    "'proxy' must have one of the following "
                                    "values: 'plain', 'encrypted'");
 
@@ -1183,7 +1165,7 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
                if (proxyval != NULL &&
                    strcasecmp(proxyval, "encrypted") == 0 && !do_tls)
                {
-                       cfg_obj_log(proxyobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(proxyobj, ISC_LOG_ERROR,
                                    "'proxy encrypted' can be used only when "
                                    "encryption is enabled by setting 'tls' to "
                                    "a defined value or to 'ephemeral'");
@@ -1195,7 +1177,7 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
        }
 
        tresult = cfg_acl_fromconfig(cfg_tuple_get(listener, "acl"), config,
-                                    logctx, actx, mctx, 0, &acl);
+                                    actx, mctx, 0, &acl);
        if (result == ISC_R_SUCCESS) {
                result = tresult;
        }
@@ -1209,14 +1191,14 @@ check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
 
 static isc_result_t
 check_listeners(const cfg_obj_t *list, const cfg_obj_t *config,
-               cfg_aclconfctx_t *actx, isc_log_t *logctx, isc_mem_t *mctx) {
+               cfg_aclconfctx_t *actx, isc_mem_t *mctx) {
        isc_result_t tresult, result = ISC_R_SUCCESS;
        const cfg_listelt_t *elt = NULL;
 
        for (elt = cfg_list_first(list); elt != NULL; elt = cfg_list_next(elt))
        {
                const cfg_obj_t *obj = cfg_listelt_value(elt);
-               tresult = check_listener(obj, config, actx, logctx, mctx);
+               tresult = check_listener(obj, config, actx, mctx);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -1226,8 +1208,7 @@ check_listeners(const cfg_obj_t *list, const cfg_obj_t *config,
 }
 
 static isc_result_t
-check_port(const cfg_obj_t *options, isc_log_t *logctx, const char *type,
-          in_port_t *portp) {
+check_port(const cfg_obj_t *options, const char *type, in_port_t *portp) {
        const cfg_obj_t *portobj = NULL;
        isc_result_t result;
 
@@ -1237,8 +1218,7 @@ check_port(const cfg_obj_t *options, isc_log_t *logctx, const char *type,
        }
 
        if (cfg_obj_asuint32(portobj) >= UINT16_MAX) {
-               cfg_obj_log(portobj, logctx, ISC_LOG_ERROR,
-                           "port '%u' out of range",
+               cfg_obj_log(portobj, ISC_LOG_ERROR, "port '%u' out of range",
                            cfg_obj_asuint32(portobj));
                return (ISC_R_RANGE);
        }
@@ -1249,8 +1229,7 @@ check_port(const cfg_obj_t *options, isc_log_t *logctx, const char *type,
 
 static isc_result_t
 check_options(const cfg_obj_t *options, const cfg_obj_t *config,
-             bool check_algorithms, isc_log_t *logctx, isc_mem_t *mctx,
-             optlevel_t optlevel) {
+             bool check_algorithms, isc_mem_t *mctx, optlevel_t optlevel) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
        unsigned int i;
@@ -1315,19 +1294,19 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                /*
                 * Check port values, and record "port" for later use.
                 */
-               tresult = check_port(options, logctx, "port", &dnsport);
+               tresult = check_port(options, "port", &dnsport);
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
                }
-               tresult = check_port(options, logctx, "tls-port", NULL);
+               tresult = check_port(options, "tls-port", NULL);
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
                }
-               tresult = check_port(options, logctx, "http-port", NULL);
+               tresult = check_port(options, "http-port", NULL);
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
                }
-               tresult = check_port(options, logctx, "https-port", NULL);
+               tresult = check_port(options, "https-port", NULL);
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -1346,14 +1325,13 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                        cfg_obj_assockaddr(obj);
                                in_port_t port = isc_sockaddr_getport(sa);
                                if (port == dnsport) {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "'%s' cannot specify the "
                                                    "DNS listener port (%d)",
                                                    sources[i], port);
                                        result = ISC_R_FAILURE;
                                } else if (port != 0) {
-                                       cfg_obj_log(obj, logctx,
-                                                   ISC_LOG_WARNING,
+                                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                                    "'%s': specifying a port "
                                                    "is not recommended",
                                                    sources[i]);
@@ -1379,12 +1357,12 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                        val = cfg_obj_asuint32(obj);
                }
                if (val > intervals[i].max) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "%s '%u' is out of range (0..%u)",
                                    intervals[i].name, val, intervals[i].max);
                        result = ISC_R_RANGE;
                } else if (val > (UINT32_MAX / intervals[i].scale)) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "%s '%d' is out of range",
                                    intervals[i].name, val);
                        result = ISC_R_RANGE;
@@ -1400,7 +1378,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        (void)cfg_map_get(options, "key-store", &obj);
        if (obj != NULL) {
                if (optlevel != optlevel_config) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "may only be configured at the top level");
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_FAILURE;
@@ -1421,7 +1399,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                        cfg_tuple_get(kconfig, "name"));
                                if (strcmp(DNS_KEYSTORE_KEYDIRECTORY, val) == 0)
                                {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "name '%s' not allowed",
                                                    DNS_KEYSTORE_KEYDIRECTORY);
                                        if (result == ISC_R_SUCCESS) {
@@ -1441,16 +1419,14 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                                break;
                                        case ISC_R_FILENOTFOUND:
                                                cfg_obj_log(
-                                                       obj, logctx,
-                                                       ISC_LOG_WARNING,
+                                                       obj, ISC_LOG_WARNING,
                                                        "key-store directory: "
                                                        "'%s' does not exist",
                                                        val);
                                                break;
                                        case ISC_R_INVALIDFILE:
                                                cfg_obj_log(
-                                                       obj, logctx,
-                                                       ISC_LOG_WARNING,
+                                                       obj, ISC_LOG_WARNING,
                                                        "key-store directory: "
                                                        "'%s' is not a "
                                                        "directory",
@@ -1458,8 +1434,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                                break;
                                        default:
                                                cfg_obj_log(
-                                                       obj, logctx,
-                                                       ISC_LOG_WARNING,
+                                                       obj, ISC_LOG_WARNING,
                                                        "key-store directory: "
                                                        "'%s' %s",
                                                        val,
@@ -1470,8 +1445,8 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                        }
                                }
 
-                               ret = cfg_keystore_fromconfig(
-                                       kconfig, mctx, logctx, &kslist, NULL);
+                               ret = cfg_keystore_fromconfig(kconfig, mctx,
+                                                             &kslist, NULL);
                                if (ret != ISC_R_SUCCESS) {
                                        if (result == ISC_R_SUCCESS) {
                                                result = ret;
@@ -1484,7 +1459,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        /*
         * Add default key-store "key-directory".
         */
-       tresult = cfg_keystore_fromconfig(NULL, mctx, logctx, &kslist, NULL);
+       tresult = cfg_keystore_fromconfig(NULL, mctx, &kslist, NULL);
        if (tresult != ISC_R_SUCCESS) {
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
@@ -1528,8 +1503,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
 
                                        ret = cfg_kasp_fromconfig(
                                                kconfig, NULL, check_algorithms,
-                                               mctx, logctx, &kslist, &list,
-                                               &kasp);
+                                               mctx, &kslist, &list, &kasp);
                                        if (ret != ISC_R_SUCCESS) {
                                                if (result == ISC_R_SUCCESS) {
                                                        result = ret;
@@ -1552,7 +1526,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                }
 
                if (bad_kasp) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnssec-policy may only be configured at "
                                    "the top level, please use name reference "
                                    "at the zone level");
@@ -1560,7 +1534,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                result = ISC_R_FAILURE;
                        }
                } else if (bad_name) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnssec-policy name may not be 'insecure', "
                                    "'none', or 'default' (which are built-in "
                                    "policies)");
@@ -1589,7 +1563,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
 
                val = cfg_obj_asuint32(obj);
                if (val != 0 && (val < 35 || val > 4096)) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "max-rsa-exponent-size '%u' is out of "
                                    "range (35..4096)",
                                    val);
@@ -1604,7 +1578,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                if (strcasecmp(str, "a") != 0 && strcasecmp(str, "aaaa") != 0 &&
                    strcasecmp(str, "none") != 0)
                {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "preferred-glue unexpected value '%s'",
                                    str);
                }
@@ -1620,7 +1594,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                     element = cfg_list_next(element))
                {
                        obj = cfg_listelt_value(element);
-                       tresult = disabled_algorithms(obj, logctx);
+                       tresult = disabled_algorithms(obj);
                        if (tresult != ISC_R_SUCCESS) {
                                result = tresult;
                        }
@@ -1637,7 +1611,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                     element = cfg_list_next(element))
                {
                        obj = cfg_listelt_value(element);
-                       tresult = disabled_ds_digests(obj, logctx);
+                       tresult = disabled_ds_digests(obj);
                        if (tresult != ISC_R_SUCCESS) {
                                result = tresult;
                        }
@@ -1659,8 +1633,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                             element = cfg_list_next(element))
                        {
                                obj = cfg_listelt_value(element);
-                               tresult = mustbesecure(obj, symtab, logctx,
-                                                      mctx);
+                               tresult = mustbesecure(obj, symtab, mctx);
                                if (result == ISC_R_SUCCESS &&
                                    tresult != ISC_R_SUCCESS)
                                {
@@ -1682,7 +1655,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                if (obj != NULL) {
                        str = cfg_obj_asstring(obj);
                        if (check_name(str) != ISC_R_SUCCESS) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "%s: invalid name '%s'",
                                            server_contact[i], str);
                                if (result == ISC_R_SUCCESS) {
@@ -1703,7 +1676,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                obj = cfg_listelt_value(element);
                str = cfg_obj_asstring(obj);
                if (check_name(str) != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "disable-empty-zone: invalid name '%s'",
                                    str);
                        if (result == ISC_R_SUCCESS) {
@@ -1721,7 +1694,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        if (obj != NULL && cfg_obj_isstring(obj) &&
            strlen(cfg_obj_asstring(obj)) > 1024U)
        {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "'server-id' too big (>1024 bytes)");
                if (result == ISC_R_SUCCESS) {
                        result = ISC_R_FAILURE;
@@ -1733,13 +1706,13 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        if (obj != NULL) {
                lifetime = cfg_obj_asduration(obj);
                if (lifetime > 604800) { /* 7 days */
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'nta-lifetime' cannot exceed one week");
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_RANGE;
                        }
                } else if (lifetime == 0) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'nta-lifetime' may not be zero");
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_RANGE;
@@ -1752,7 +1725,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        if (obj != NULL) {
                uint32_t recheck = cfg_obj_asduration(obj);
                if (recheck > 604800) { /* 7 days */
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'nta-recheck' cannot exceed one week");
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_RANGE;
@@ -1760,7 +1733,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                }
 
                if (recheck > lifetime) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "'nta-recheck' (%d seconds) is "
                                    "greater than 'nta-lifetime' "
                                    "(%d seconds)",
@@ -1773,7 +1746,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        if (obj != NULL) {
                ccalg = cfg_obj_asstring(obj);
                if (strcasecmp(ccalg, "aes") == 0) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "cookie-algorithm 'aes' is obsolete and "
                                    "should be removed");
                        if (result == ISC_R_SUCCESS) {
@@ -1799,10 +1772,10 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                        isc_buffer_init(&b, secret, sizeof(secret));
                        tresult = isc_hex_decodestring(str, &b);
                        if (tresult == ISC_R_NOSPACE) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "cookie-secret: too long");
                        } else if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "cookie-secret: invalid hex "
                                            "string");
                        }
@@ -1817,7 +1790,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                        if (strcasecmp(ccalg, "siphash24") == 0 &&
                            usedlength != ISC_SIPHASH24_KEY_LENGTH)
                        {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "SipHash-2-4 cookie-secret must be "
                                            "128 bits");
                                if (result == ISC_R_SUCCESS) {
@@ -1846,12 +1819,12 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                    (fstrm[i].max != 0U && value > fstrm[i].max))
                {
                        if (fstrm[i].max != 0U) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "%s '%u' out of range (%u..%u)",
                                            fstrm[i].name, value, fstrm[i].min,
                                            fstrm[i].max);
                        } else {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "%s out of range (%u < %u)",
                                            fstrm[i].name, value, fstrm[i].min);
                        }
@@ -1867,7 +1840,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                value >>= 1;
                        } while (value != 0U);
                        if (bits != 1) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "%s '%u' not a power-of-2",
                                            fstrm[i].name,
                                            cfg_obj_asuint32(obj));
@@ -1887,7 +1860,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
 
                obj2 = cfg_tuple_get(obj, "mode");
                if (obj2 == NULL) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnstap-output mode not found");
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_FAILURE;
@@ -1903,7 +1876,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                        if (obj2 != NULL && !cfg_obj_isvoid(obj2) &&
                            dmode == dns_dtmode_unix)
                        {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "dnstap-output size "
                                            "cannot be set with mode unix");
                                if (result == ISC_R_SUCCESS) {
@@ -1915,7 +1888,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                        if (obj2 != NULL && !cfg_obj_isvoid(obj2) &&
                            dmode == dns_dtmode_unix)
                        {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "dnstap-output versions "
                                            "cannot be set with mode unix");
                                if (result == ISC_R_SUCCESS) {
@@ -1927,7 +1900,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                        if (obj2 != NULL && !cfg_obj_isvoid(obj2) &&
                            dmode == dns_dtmode_unix)
                        {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "dnstap-output suffix "
                                            "cannot be set with mode unix");
                                if (result == ISC_R_SUCCESS) {
@@ -1944,7 +1917,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                uint64_t mapsize = cfg_obj_asuint64(obj);
 
                if (mapsize < (1ULL << 20)) { /* 1 megabyte */
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'lmdb-mapsize "
                                    "%" PRId64 "' "
                                    "is too small",
@@ -1953,7 +1926,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                result = ISC_R_RANGE;
                        }
                } else if (mapsize > (1ULL << 40)) { /* 1 terabyte */
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'lmdb-mapsize "
                                    "%" PRId64 "' "
                                    "is too large",
@@ -1969,14 +1942,14 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        if (obj != NULL && cfg_obj_ispercentage(obj)) {
                uint32_t percent = cfg_obj_aspercentage(obj);
                if (percent == 0) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'ixfr-max-ratio' must be a nonzero "
                                    "percentage or 'unlimited')");
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_RANGE;
                        }
                } else if (percent > 100) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "'ixfr-max-ratio %d%%' exceeds 100%%",
                                    percent);
                }
@@ -1998,7 +1971,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                        const char *keyword = cfg_obj_asstring(type);
                        if (strcasecmp(keyword, "primary") == 0) {
                                if ((values & PRI) == PRI) {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "'check-names primary' "
                                                    "duplicated");
                                        if (result == ISC_R_SUCCESS) {
@@ -2008,7 +1981,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                values |= PRI;
                        } else if (strcasecmp(keyword, "master") == 0) {
                                if ((values & MAS) == MAS) {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "'check-names master' "
                                                    "duplicated");
                                        if (result == ISC_R_SUCCESS) {
@@ -2018,7 +1991,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                values |= MAS;
                        } else if (strcasecmp(keyword, "secondary") == 0) {
                                if ((values & SCN) == SCN) {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "'check-names secondary' "
                                                    "duplicated");
                                        if (result == ISC_R_SUCCESS) {
@@ -2028,7 +2001,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                                values |= SCN;
                        } else if (strcasecmp(keyword, "slave") == 0) {
                                if ((values & SLA) == SLA) {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "'check-names slave' "
                                                    "duplicated");
                                        if (result == ISC_R_SUCCESS) {
@@ -2040,7 +2013,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                }
 
                if ((values & (PRI | MAS)) == (PRI | MAS)) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'check-names' cannot take both "
                                    "'primary' and 'master'");
                        if (result == ISC_R_SUCCESS) {
@@ -2049,7 +2022,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
                }
 
                if ((values & (SCN | SLA)) == (SCN | SLA)) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'check-names' cannot take both "
                                    "'secondary' and 'slave'");
                        if (result == ISC_R_SUCCESS) {
@@ -2063,7 +2036,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        if (obj != NULL) {
                uint32_t refresh_time = cfg_obj_asduration(obj);
                if (refresh_time > 0 && refresh_time < 30) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "'stale-refresh-time' should either be 0 "
                                    "or otherwise 30 seconds or higher");
                }
@@ -2076,8 +2049,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        if (obj != NULL) {
                dns_acl_t *acl = NULL;
 
-               tresult = cfg_acl_fromconfig(obj, config, logctx, actx, mctx, 0,
-                                            &acl);
+               tresult = cfg_acl_fromconfig(obj, config, actx, mctx, 0, &acl);
                if (acl != NULL) {
                        dns_acl_detach(&acl);
                }
@@ -2090,7 +2062,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        (void)cfg_map_get(options, "listen-on", &obj);
        if (obj != NULL) {
                INSIST(config != NULL);
-               tresult = check_listeners(obj, config, actx, logctx, mctx);
+               tresult = check_listeners(obj, config, actx, mctx);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -2100,7 +2072,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        (void)cfg_map_get(options, "listen-on-v6", &obj);
        if (obj != NULL) {
                INSIST(config != NULL);
-               tresult = check_listeners(obj, config, actx, logctx, mctx);
+               tresult = check_listeners(obj, config, actx, mctx);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -2111,7 +2083,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
        if (obj != NULL) {
                uint32_t restarts = cfg_obj_asuint32(obj);
                if (restarts == 0 || restarts > 255) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'max-query-restarts' is out of "
                                    "range 1..255)");
                        if (result == ISC_R_SUCCESS) {
@@ -2132,8 +2104,7 @@ check_options(const cfg_obj_t *options, const cfg_obj_t *config,
  */
 static isc_result_t
 check_remoteserverlist(const cfg_obj_t *cctx, const char *list,
-                      isc_log_t *logctx, isc_symtab_t *symtab,
-                      isc_mem_t *mctx) {
+                      isc_symtab_t *symtab, isc_mem_t *mctx) {
        isc_symvalue_t symvalue;
        isc_result_t result, tresult;
        const cfg_obj_t *obj = NULL;
@@ -2169,7 +2140,7 @@ check_remoteserverlist(const cfg_obj_t *cctx, const char *list,
                        if (file == NULL) {
                                file = "<unknown file>";
                        }
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "%s list '%s' is duplicated: "
                                    "also defined at %s:%u",
                                    list, name, file, line);
@@ -2187,7 +2158,7 @@ check_remoteserverlist(const cfg_obj_t *cctx, const char *list,
  * Check primaries lists for duplicates.
  */
 static isc_result_t
-check_primarylists(const cfg_obj_t *cctx, isc_log_t *logctx, isc_mem_t *mctx) {
+check_primarylists(const cfg_obj_t *cctx, isc_mem_t *mctx) {
        isc_result_t result, tresult;
        isc_symtab_t *symtab = NULL;
 
@@ -2195,12 +2166,11 @@ check_primarylists(const cfg_obj_t *cctx, isc_log_t *logctx, isc_mem_t *mctx) {
        if (result != ISC_R_SUCCESS) {
                return (result);
        }
-       tresult = check_remoteserverlist(cctx, "primaries", logctx, symtab,
-                                        mctx);
+       tresult = check_remoteserverlist(cctx, "primaries", symtab, mctx);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
-       tresult = check_remoteserverlist(cctx, "masters", logctx, symtab, mctx);
+       tresult = check_remoteserverlist(cctx, "masters", symtab, mctx);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
@@ -2212,8 +2182,7 @@ check_primarylists(const cfg_obj_t *cctx, isc_log_t *logctx, isc_mem_t *mctx) {
  * Check parental-agents lists for duplicates.
  */
 static isc_result_t
-check_parentalagentlists(const cfg_obj_t *cctx, isc_log_t *logctx,
-                        isc_mem_t *mctx) {
+check_parentalagentlists(const cfg_obj_t *cctx, isc_mem_t *mctx) {
        isc_result_t result, tresult;
        isc_symtab_t *symtab = NULL;
 
@@ -2221,8 +2190,7 @@ check_parentalagentlists(const cfg_obj_t *cctx, isc_log_t *logctx,
        if (result != ISC_R_SUCCESS) {
                return (result);
        }
-       tresult = check_remoteserverlist(cctx, "parental-agents", logctx,
-                                        symtab, mctx);
+       tresult = check_remoteserverlist(cctx, "parental-agents", symtab, mctx);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
@@ -2232,8 +2200,7 @@ check_parentalagentlists(const cfg_obj_t *cctx, isc_log_t *logctx,
 
 #if HAVE_LIBNGHTTP2
 static isc_result_t
-check_httpserver(const cfg_obj_t *http, isc_log_t *logctx,
-                isc_symtab_t *symtab) {
+check_httpserver(const cfg_obj_t *http, isc_symtab_t *symtab) {
        isc_result_t result, tresult;
        const char *name = cfg_obj_asstring(cfg_map_getname(http));
        const cfg_obj_t *eps = NULL;
@@ -2241,7 +2208,7 @@ check_httpserver(const cfg_obj_t *http, isc_log_t *logctx,
        isc_symvalue_t symvalue;
 
        if (strcasecmp(name, "default") == 0) {
-               cfg_obj_log(http, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(http, ISC_LOG_ERROR,
                            "'http' name cannot be '%s' (which is a "
                            "built-in configuration)",
                            name);
@@ -2264,7 +2231,7 @@ check_httpserver(const cfg_obj_t *http, isc_log_t *logctx,
                                file = "<unknown file>";
                        }
 
-                       cfg_obj_log(http, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(http, ISC_LOG_ERROR,
                                    "http '%s' is duplicated: "
                                    "also defined at %s:%u",
                                    name, file, line);
@@ -2280,7 +2247,7 @@ check_httpserver(const cfg_obj_t *http, isc_log_t *logctx,
                        const cfg_obj_t *ep = cfg_listelt_value(elt);
                        const char *path = cfg_obj_asstring(ep);
                        if (!isc_nm_http_path_isvalid(path)) {
-                               cfg_obj_log(eps, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(eps, ISC_LOG_ERROR,
                                            "endpoint '%s' is not a "
                                            "valid absolute HTTP path",
                                            path);
@@ -2295,7 +2262,7 @@ check_httpserver(const cfg_obj_t *http, isc_log_t *logctx,
 }
 
 static isc_result_t
-check_httpservers(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
+check_httpservers(const cfg_obj_t *config, isc_mem_t *mctx) {
        isc_result_t result, tresult;
        const cfg_obj_t *obj = NULL;
        const cfg_listelt_t *elt = NULL;
@@ -2314,7 +2281,7 @@ check_httpservers(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
 
        for (elt = cfg_list_first(obj); elt != NULL; elt = cfg_list_next(elt)) {
                obj = cfg_listelt_value(elt);
-               tresult = check_httpserver(obj, logctx, symtab);
+               tresult = check_httpserver(obj, symtab);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -2328,7 +2295,7 @@ done:
 
 static isc_result_t
 check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
-                   isc_log_t *logctx, isc_symtab_t *symtab) {
+                   isc_symtab_t *symtab) {
        isc_result_t result, tresult;
        const cfg_obj_t *tls_proto_list = NULL, *tls_key = NULL,
                        *tls_cert = NULL, *tls_ciphers = NULL,
@@ -2338,7 +2305,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
 
        if (strcasecmp(name, "ephemeral") == 0 || strcasecmp(name, "none") == 0)
        {
-               cfg_obj_log(tlsobj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(tlsobj, ISC_LOG_ERROR,
                            "tls clause name '%s' is reserved for internal use",
                            name);
                result = ISC_R_FAILURE;
@@ -2360,7 +2327,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
                                file = "<unknown file>";
                        }
 
-                       cfg_obj_log(tlsobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(tlsobj, ISC_LOG_ERROR,
                                    "tls clause '%s' is duplicated: "
                                    "also defined at %s:%u",
                                    name, file, line);
@@ -2372,7 +2339,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
        if ((tls_key == NULL && tls_cert != NULL) ||
            (tls_cert == NULL && tls_key != NULL))
        {
-               cfg_obj_log(tlsobj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(tlsobj, ISC_LOG_ERROR,
                            "tls '%s': 'cert-file' and 'key-file' must "
                            "both be specified, or both omitted",
                            name);
@@ -2394,16 +2361,14 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
                                isc_tls_protocol_name_to_version(tls_sver);
 
                        if (ver == ISC_TLS_PROTO_VER_UNDEFINED) {
-                               cfg_obj_log(tls_proto_obj, logctx,
-                                           ISC_LOG_ERROR,
+                               cfg_obj_log(tls_proto_obj, ISC_LOG_ERROR,
                                            "'%s' is not a valid "
                                            "TLS protocol version",
                                            tls_sver);
                                result = ISC_R_FAILURE;
                                continue;
                        } else if (!isc_tls_protocol_supported(ver)) {
-                               cfg_obj_log(tls_proto_obj, logctx,
-                                           ISC_LOG_ERROR,
+                               cfg_obj_log(tls_proto_obj, ISC_LOG_ERROR,
                                            "'%s' is not "
                                            "supported by the "
                                            "cryptographic library version in "
@@ -2413,8 +2378,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
                        }
 
                        if ((tls_protos & ver) != 0) {
-                               cfg_obj_log(tls_proto_obj, logctx,
-                                           ISC_LOG_WARNING,
+                               cfg_obj_log(tls_proto_obj, ISC_LOG_WARNING,
                                            "'%s' is specified more than once "
                                            "in '%s'",
                                            tls_sver, name);
@@ -2425,7 +2389,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
                }
 
                if (tls_protos == 0) {
-                       cfg_obj_log(tlsobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(tlsobj, ISC_LOG_ERROR,
                                    "tls '%s' does not contain any valid "
                                    "TLS protocol versions definitions",
                                    name);
@@ -2438,7 +2402,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
        if (tresult == ISC_R_SUCCESS) {
                const char *ciphers = cfg_obj_asstring(tls_ciphers);
                if (!isc_tls_cipherlist_valid(ciphers)) {
-                       cfg_obj_log(tls_ciphers, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(tls_ciphers, ISC_LOG_ERROR,
                                    "'ciphers' in the 'tls' clause '%s' is "
                                    "not a "
                                    "valid cipher list string",
@@ -2453,7 +2417,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
                const char *cipher_suites = cfg_obj_asstring(tls_cipher_suites);
                if (!isc_tls_cipher_suites_valid(cipher_suites)) {
                        cfg_obj_log(
-                               tls_cipher_suites, logctx, ISC_LOG_ERROR,
+                               tls_cipher_suites, ISC_LOG_ERROR,
                                "'cipher-suites' in the 'tls' clause '%s' is "
                                "not a valid cipher suites string",
                                name);
@@ -2465,8 +2429,7 @@ check_tls_defintion(const cfg_obj_t *tlsobj, const char *name,
 }
 
 static isc_result_t
-check_tls_definitions(const cfg_obj_t *config, isc_log_t *logctx,
-                     isc_mem_t *mctx) {
+check_tls_definitions(const cfg_obj_t *config, isc_mem_t *mctx) {
        isc_result_t result, tresult;
        const cfg_obj_t *obj = NULL;
        const cfg_listelt_t *elt = NULL;
@@ -2487,7 +2450,7 @@ check_tls_definitions(const cfg_obj_t *config, isc_log_t *logctx,
                const char *name;
                obj = cfg_listelt_value(elt);
                name = cfg_obj_asstring(cfg_map_getname(obj));
-               tresult = check_tls_defintion(obj, name, logctx, symtab);
+               tresult = check_tls_defintion(obj, name, symtab);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -2546,8 +2509,7 @@ get_remoteservers_def(const char *list, const char *name, const cfg_obj_t *cctx,
 
 static isc_result_t
 validate_remotes(const char *list, const cfg_obj_t *obj,
-                const cfg_obj_t *config, uint32_t *countp, isc_log_t *logctx,
-                isc_mem_t *mctx) {
+                const cfg_obj_t *config, uint32_t *countp, isc_mem_t *mctx) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
        uint32_t count = 0;
@@ -2589,7 +2551,7 @@ resume:
                                tresult = dns_name_fromstring(
                                        nm, str, dns_rootname, 0, NULL);
                                if (tresult != ISC_R_SUCCESS) {
-                                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(key, ISC_LOG_ERROR,
                                                    "'%s' is not a valid name",
                                                    str);
                                        if (result == ISC_R_SUCCESS) {
@@ -2604,7 +2566,7 @@ resume:
                                tresult = dns_name_fromstring(
                                        nm, str, dns_rootname, 0, NULL);
                                if (tresult != ISC_R_SUCCESS) {
-                                       cfg_obj_log(tls, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(tls, ISC_LOG_ERROR,
                                                    "'%s' is not a valid name",
                                                    str);
                                        if (result == ISC_R_SUCCESS) {
@@ -2619,8 +2581,7 @@ resume:
                                                              str);
                                        if (tlsmap == NULL) {
                                                cfg_obj_log(
-                                                       tls, logctx,
-                                                       ISC_LOG_ERROR,
+                                                       tls, ISC_LOG_ERROR,
                                                        "tls '%s' is not "
                                                        "defined",
                                                        cfg_obj_asstring(tls));
@@ -2631,16 +2592,14 @@ resume:
                        continue;
                }
                if (!cfg_obj_isvoid(key)) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
-                                   "unexpected token '%s'",
+                       cfg_obj_log(key, ISC_LOG_ERROR, "unexpected token '%s'",
                                    cfg_obj_asstring(key));
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_FAILURE;
                        }
                }
                if (!cfg_obj_isvoid(tls)) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
-                                   "unexpected token '%s'",
+                       cfg_obj_log(key, ISC_LOG_ERROR, "unexpected token '%s'",
                                    cfg_obj_asstring(tls));
                        if (result == ISC_R_SUCCESS) {
                                result = ISC_R_FAILURE;
@@ -2658,7 +2617,7 @@ resume:
                        if (result == ISC_R_SUCCESS) {
                                result = tresult;
                        }
-                       cfg_obj_log(addr, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(addr, ISC_LOG_ERROR,
                                    "unable to find %s list '%s'", list,
                                    listname);
                        continue;
@@ -2686,7 +2645,7 @@ resume:
 }
 
 static isc_result_t
-check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
+check_update_policy(const cfg_obj_t *policy) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
        const cfg_listelt_t *element;
@@ -2721,14 +2680,14 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                tresult = dns_ssu_mtypefromstring(cfg_obj_asstring(matchtype),
                                                  &mtype);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(identity, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(identity, ISC_LOG_ERROR,
                                    "has a bad match-type");
                }
 
                str = cfg_obj_asstring(identity);
                tresult = dns_name_fromstring(id, str, dns_rootname, 1, NULL);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(identity, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(identity, ISC_LOG_ERROR,
                                    "'%s' is not a valid name", str);
                        result = tresult;
                }
@@ -2747,7 +2706,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                        tresult = dns_name_fromstring(name, str, dns_rootname,
                                                      0, NULL);
                        if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(dname, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(dname, ISC_LOG_ERROR,
                                            "'%s' is not a valid name", str);
                                result = tresult;
                        }
@@ -2757,7 +2716,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                    mtype == dns_ssumatchtype_wildcard &&
                    !dns_name_iswildcard(name))
                {
-                       cfg_obj_log(identity, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(identity, ISC_LOG_ERROR,
                                    "'%s' is not a wildcard", str);
                        result = ISC_R_FAILURE;
                }
@@ -2774,7 +2733,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                            (!dns_name_equal(id, name) &&
                             !dns_name_equal(dns_rootname, name)))
                        {
-                               cfg_obj_log(identity, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(identity, ISC_LOG_ERROR,
                                            "identity and name fields are not "
                                            "the same");
                                result = ISC_R_FAILURE;
@@ -2789,7 +2748,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                        if (tresult == ISC_R_SUCCESS &&
                            !dns_name_equal(dns_rootname, name))
                        {
-                               cfg_obj_log(identity, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(identity, ISC_LOG_ERROR,
                                            "name field not set to "
                                            "placeholder value '.'");
                                result = ISC_R_FAILURE;
@@ -2810,7 +2769,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                                tresult = dns_rdatatype_fromtext(&type, &r);
                        }
                        if (tresult == ISC_R_SUCCESS) {
-                               cfg_obj_log(identity, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(identity, ISC_LOG_ERROR,
                                            "missing name field type '%s' "
                                            "found",
                                            str);
@@ -2841,8 +2800,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
                                if (max > 0xffff || end[0] != /*(*/ ')' ||
                                    end[1] != 0)
                                {
-                                       cfg_obj_log(typeobj, logctx,
-                                                   ISC_LOG_ERROR,
+                                       cfg_obj_log(typeobj, ISC_LOG_ERROR,
                                                    "'%s' is not a valid count",
                                                    bracket);
                                        result = DNS_R_SYNTAX;
@@ -2853,7 +2811,7 @@ check_update_policy(const cfg_obj_t *policy, isc_log_t *logctx) {
 
                        tresult = dns_rdatatype_fromtext(&type, &r);
                        if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(typeobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(typeobj, ISC_LOG_ERROR,
                                            "'%.*s' is not a valid type",
                                            (int)r.length, r.base);
                                result = tresult;
@@ -2869,7 +2827,7 @@ typedef struct {
 } optionstable;
 
 static isc_result_t
-check_nonzero(const cfg_obj_t *options, isc_log_t *logctx) {
+check_nonzero(const cfg_obj_t *options) {
        isc_result_t result = ISC_R_SUCCESS;
        const cfg_obj_t *obj = NULL;
        unsigned int i;
@@ -2885,8 +2843,8 @@ check_nonzero(const cfg_obj_t *options, isc_log_t *logctx) {
                if (cfg_map_get(options, nonzero[i], &obj) == ISC_R_SUCCESS &&
                    cfg_obj_asuint32(obj) == 0)
                {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
-                                   "'%s' must not be zero", nonzero[i]);
+                       cfg_obj_log(obj, ISC_LOG_ERROR, "'%s' must not be zero",
+                                   nonzero[i]);
                        result = ISC_R_FAILURE;
                }
        }
@@ -2898,8 +2856,7 @@ check_nonzero(const cfg_obj_t *options, isc_log_t *logctx) {
  * mirror zone.  Return true if it is; return false otherwise.
  */
 static bool
-check_mirror_zone_notify(const cfg_obj_t *zoptions, const char *znamestr,
-                        isc_log_t *logctx) {
+check_mirror_zone_notify(const cfg_obj_t *zoptions, const char *znamestr) {
        bool notify_configuration_ok = true;
        const cfg_obj_t *obj = NULL;
 
@@ -2930,7 +2887,7 @@ check_mirror_zone_notify(const cfg_obj_t *zoptions, const char *znamestr,
        }
 
        if (!notify_configuration_ok) {
-               cfg_obj_log(zoptions, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(zoptions, ISC_LOG_ERROR,
                            "zone '%s': mirror zones can only be used with "
                            "'notify no;' or 'notify explicit;'",
                            znamestr);
@@ -2948,8 +2905,8 @@ check_mirror_zone_notify(const cfg_obj_t *zoptions, const char *znamestr,
  */
 static bool
 check_recursion(const cfg_obj_t *config, const cfg_obj_t *voptions,
-               const cfg_obj_t *goptions, isc_log_t *logctx,
-               cfg_aclconfctx_t *actx, isc_mem_t *mctx) {
+               const cfg_obj_t *goptions, cfg_aclconfctx_t *actx,
+               isc_mem_t *mctx) {
        dns_acl_t *acl = NULL;
        const cfg_obj_t *obj;
        isc_result_t result;
@@ -2984,8 +2941,7 @@ check_recursion(const cfg_obj_t *config, const cfg_obj_t *voptions,
                result = cfg_map_get(goptions, "allow-recursion", &obj);
        }
        if (result == ISC_R_SUCCESS) {
-               result = cfg_acl_fromconfig(obj, config, logctx, actx, mctx, 0,
-                                           &acl);
+               result = cfg_acl_fromconfig(obj, config, actx, mctx, 0, &acl);
                if (result != ISC_R_SUCCESS) {
                        goto cleanup;
                }
@@ -3003,7 +2959,7 @@ cleanup:
 static isc_result_t
 check_keydir(const cfg_obj_t *config, const cfg_obj_t *zconfig,
             dns_name_t *zname, const char *name, const char *keydir,
-            isc_symtab_t *keydirs, isc_log_t *logctx, isc_mem_t *mctx) {
+            isc_symtab_t *keydirs, isc_mem_t *mctx) {
        const char *dir = keydir;
        const cfg_listelt_t *element;
        isc_result_t ret, result = ISC_R_SUCCESS;
@@ -3037,10 +2993,9 @@ check_keydir(const cfg_obj_t *config, const cfg_obj_t *zconfig,
             element = cfg_list_next(element))
        {
                cfg_obj_t *kcfg = cfg_listelt_value(element);
-               (void)cfg_keystore_fromconfig(kcfg, mctx, logctx, &kslist,
-                                             NULL);
+               (void)cfg_keystore_fromconfig(kcfg, mctx, &kslist, NULL);
        }
-       (void)cfg_keystore_fromconfig(NULL, mctx, logctx, &kslist, NULL);
+       (void)cfg_keystore_fromconfig(NULL, mctx, &kslist, NULL);
 
        /*
         * Look for the dnssec-policy by name, which is the dnssec-policy
@@ -3061,8 +3016,8 @@ check_keydir(const cfg_obj_t *config, const cfg_obj_t *zconfig,
                        continue;
                }
 
-               ret = cfg_kasp_fromconfig(kconfig, NULL, false, mctx, logctx,
-                                         &kslist, &kasplist, &kasp);
+               ret = cfg_kasp_fromconfig(kconfig, NULL, false, mctx, &kslist,
+                                         &kasplist, &kasp);
                if (ret != ISC_R_SUCCESS) {
                        kasp = NULL;
                }
@@ -3085,7 +3040,7 @@ check_keydir(const cfg_obj_t *config, const cfg_obj_t *zconfig,
                ret = keydirexist(zconfig,
                                  keystore ? "key-store directory"
                                           : "key-directory",
-                                 zname, dir, name, keydirs, logctx, mctx);
+                                 zname, dir, name, keydirs, mctx);
                if (ret != ISC_R_SUCCESS) {
                        result = ret;
                }
@@ -3096,7 +3051,7 @@ check_keydir(const cfg_obj_t *config, const cfg_obj_t *zconfig,
 check:
        if (!done) {
                ret = keydirexist(zconfig, "key-directory", zname, dir, name,
-                                 keydirs, logctx, mctx);
+                                 keydirs, mctx);
                if (ret != ISC_R_SUCCESS) {
                        result = ret;
                }
@@ -3128,7 +3083,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
               const cfg_obj_t *config, isc_symtab_t *symtab,
               isc_symtab_t *files, isc_symtab_t *keydirs, isc_symtab_t *inview,
               const char *viewname, dns_rdataclass_t defclass,
-              cfg_aclconfctx_t *actx, isc_log_t *logctx, isc_mem_t *mctx) {
+              cfg_aclconfctx_t *actx, isc_mem_t *mctx) {
        const char *znamestr;
        const char *typestr = NULL;
        const char *target = NULL;
@@ -3189,7 +3144,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                obj = NULL;
                (void)cfg_map_get(zoptions, "type", &obj);
                if (obj == NULL) {
-                       cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "zone '%s': type not present", znamestr);
                        return (ISC_R_FAILURE);
                }
@@ -3216,14 +3171,14 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                } else if (strcasecmp(typestr, "redirect") == 0) {
                        ztype = CFG_ZONE_REDIRECT;
                } else {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "zone '%s': invalid type %s", znamestr,
                                    typestr);
                        return (ISC_R_FAILURE);
                }
 
                if (ztype == CFG_ZONE_REDIRECT && strcmp(znamestr, ".") != 0) {
-                       cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "redirect zones must be called \".\"");
                        return (ISC_R_FAILURE);
                }
@@ -3237,13 +3192,13 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                r.length = strlen(r.base);
                result = dns_rdataclass_fromtext(&zclass, &r);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "zone '%s': invalid class %s", znamestr,
                                    r.base);
                        return (ISC_R_FAILURE);
                }
                if (zclass != defclass) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "zone '%s': class '%s' does not "
                                    "match view/default class",
                                    znamestr, r.base);
@@ -3264,7 +3219,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        tresult = dns_name_fromtext(dns_fixedname_name(&fixedname), &b,
                                    dns_rootname, DNS_NAME_DOWNCASE, NULL);
        if (tresult != ISC_R_SUCCESS) {
-               cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(zconfig, ISC_LOG_ERROR,
                            "zone '%s': is not a valid name", znamestr);
                result = ISC_R_FAILURE;
        } else {
@@ -3286,7 +3241,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                                                     : 3,
                        symtab,
                        "zone '%s': already exists previous definition: %s:%u",
-                       logctx, mctx);
+                       mctx);
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -3308,7 +3263,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                case CFG_ZONE_INVIEW:
                        tresult = isc_symtab_lookup(inview, key, 0, NULL);
                        if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(inviewobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(inviewobj, ISC_LOG_ERROR,
                                            "'in-view' zone '%s' "
                                            "does not exist in view '%s', "
                                            "or view '%s' is not yet defined",
@@ -3358,7 +3313,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        maxopts++;
                }
                if (cfg_map_count(zoptions) > maxopts) {
-                       cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "zone '%s': 'in-view' used "
                                    "with incompatible zone options",
                                    znamestr);
@@ -3372,7 +3327,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        /*
         * Check if value is zero.
         */
-       if (check_nonzero(zoptions, logctx) != ISC_R_SUCCESS) {
+       if (check_nonzero(zoptions) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
@@ -3431,7 +3386,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        }
 
                        if (!has_dnssecpolicy) {
-                               cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                            "zone '%s': option "
                                            "'dnssec-policy %s' has no "
                                            "matching dnssec-policy config",
@@ -3459,7 +3414,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        (void)cfg_map_get(goptions, "max-zone-ttl", &obj);
                }
                if (obj != NULL) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "zone '%s': option 'max-zone-ttl' "
                                    "cannot be used together with "
                                    "'dnssec-policy'",
@@ -3479,7 +3434,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                if (cfg_map_get(zoptions, option, &obj) == ISC_R_SUCCESS &&
                    obj != NULL && !cfg_clause_validforzone(option, ztype))
                {
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "option '%s' is not allowed "
                                    "in '%s' zone '%s'",
                                    option, typestr, znamestr);
@@ -3493,7 +3448,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
         */
        for (i = 0; i < ARRAY_SIZE(acls); i++) {
                tresult = checkacl(acls[i], actx, zconfig, voptions, config,
-                                  logctx, mctx);
+                                  mctx);
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -3504,7 +3459,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
         * at the zone level for mirror zones.
         */
        if (ztype == CFG_ZONE_MIRROR &&
-           !check_mirror_zone_notify(zoptions, znamestr, logctx))
+           !check_mirror_zone_notify(zoptions, znamestr))
        {
                result = ISC_R_FAILURE;
        }
@@ -3543,7 +3498,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                obj = NULL;
                tresult = cfg_map_get(zoptions, "also-notify", &obj);
                if (tresult == ISC_R_SUCCESS && !donotify) {
-                       cfg_obj_log(zoptions, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(zoptions, ISC_LOG_WARNING,
                                    "zone '%s': 'also-notify' set but "
                                    "'notify' is disabled",
                                    znamestr);
@@ -3557,7 +3512,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                if (tresult == ISC_R_SUCCESS && donotify) {
                        uint32_t count;
                        tresult = validate_remotes("primaries", obj, config,
-                                                  &count, logctx, mctx);
+                                                  &count, mctx);
                        if (tresult != ISC_R_SUCCESS && result == ISC_R_SUCCESS)
                        {
                                result = tresult;
@@ -3586,27 +3541,27 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        /* ...bug if it was set, "masters" must not be. */
                        (void)cfg_map_get(zoptions, "masters", &obj2);
                        if (obj2 != NULL) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "'primaries' and 'masters' cannot "
                                            "both be used in the same zone");
                                result = ISC_R_FAILURE;
                        }
                }
                if (obj == NULL) {
-                       cfg_obj_log(zoptions, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zoptions, ISC_LOG_ERROR,
                                    "zone '%s': missing 'primaries' entry",
                                    znamestr);
                        result = ISC_R_FAILURE;
                } else {
                        uint32_t count;
                        tresult = validate_remotes("primaries", obj, config,
-                                                  &count, logctx, mctx);
+                                                  &count, mctx);
                        if (tresult != ISC_R_SUCCESS && result == ISC_R_SUCCESS)
                        {
                                result = tresult;
                        }
                        if (tresult == ISC_R_SUCCESS && count == 0) {
-                               cfg_obj_log(zoptions, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(zoptions, ISC_LOG_ERROR,
                                            "zone '%s': "
                                            "empty 'primaries' entry",
                                            znamestr);
@@ -3629,13 +3584,13 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        in_port_t port =
                                isc_sockaddr_getport(cfg_obj_assockaddr(obj));
                        if (port == dnsport) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "'%s' cannot specify the "
                                            "DNS listener port (%d)",
                                            sources[i], port);
                                result = ISC_R_FAILURE;
                        } else if (port != 0) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                               cfg_obj_log(obj, ISC_LOG_WARNING,
                                            "'%s': specifying a port is "
                                            "not recommended",
                                            sources[i]);
@@ -3653,14 +3608,13 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                if (obj != NULL) {
                        uint32_t count;
                        tresult = validate_remotes("parental-agents", obj,
-                                                  config, &count, logctx,
-                                                  mctx);
+                                                  config, &count, mctx);
                        if (tresult != ISC_R_SUCCESS && result == ISC_R_SUCCESS)
                        {
                                result = tresult;
                        }
                        if (tresult == ISC_R_SUCCESS && count == 0) {
-                               cfg_obj_log(zoptions, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(zoptions, ISC_LOG_ERROR,
                                            "zone '%s': "
                                            "empty 'parental-agents' entry",
                                            znamestr);
@@ -3674,9 +3628,9 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
         * contradicts the purpose of the former.
         */
        if (ztype == CFG_ZONE_MIRROR &&
-           !check_recursion(config, voptions, goptions, logctx, actx, mctx))
+           !check_recursion(config, voptions, goptions, actx, mctx))
        {
-               cfg_obj_log(zoptions, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(zoptions, ISC_LOG_ERROR,
                            "zone '%s': mirror zones cannot be used if "
                            "recursion is disabled",
                            znamestr);
@@ -3696,13 +3650,13 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                obj = NULL;
                res2 = cfg_map_get(zoptions, "update-policy", &obj);
                if (res1 == ISC_R_SUCCESS && res2 == ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "zone '%s': 'allow-update' is ignored "
                                    "when 'update-policy' is present",
                                    znamestr);
                        result = ISC_R_FAILURE;
                } else if (res2 == ISC_R_SUCCESS) {
-                       res3 = check_update_policy(obj, logctx);
+                       res3 = check_update_policy(obj);
                        if (res3 != ISC_R_SUCCESS) {
                                result = ISC_R_FAILURE;
                        }
@@ -3724,10 +3678,10 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        ddns = true;
                } else if (res1 == ISC_R_SUCCESS) {
                        dns_acl_t *acl = NULL;
-                       res1 = cfg_acl_fromconfig(au, config, logctx, actx,
-                                                 mctx, 0, &acl);
+                       res1 = cfg_acl_fromconfig(au, config, actx, mctx, 0,
+                                                 &acl);
                        if (res1 != ISC_R_SUCCESS) {
-                               cfg_obj_log(au, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(au, ISC_LOG_ERROR,
                                            "acl expansion failed: %s",
                                            isc_result_totext(result));
                                result = ISC_R_FAILURE;
@@ -3749,7 +3703,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
 
                if (has_dnssecpolicy) {
                        if (!ddns && !signing) {
-                               cfg_obj_log(kasp, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(kasp, ISC_LOG_ERROR,
                                            "'inline-signing yes;' must also "
                                            "be configured explicitly for "
                                            "zones using dnssec-policy%s. See "
@@ -3770,7 +3724,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                if (res1 == ISC_R_SUCCESS) {
                        uint32_t type = cfg_obj_asuint32(obj);
                        if (type < 0xff00U || type > 0xffffU) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "sig-signing-type: %u out of "
                                            "range [%u..%u]",
                                            type, 0xff00U, 0xffffU);
@@ -3783,7 +3737,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                if (res1 == ISC_R_SUCCESS && ztype == CFG_ZONE_SECONDARY &&
                    !signing)
                {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnssec-loadkeys-interval: requires "
                                    "inline-signing when used in secondary "
                                    "zone");
@@ -3808,7 +3762,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                                        continue;
                                }
                                if ((dialups[i].allowed & ztype) == 0) {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "dialup type '%s' is not "
                                                    "allowed in '%s' "
                                                    "zone '%s'",
@@ -3818,7 +3772,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                                break;
                        }
                        if (i == sizeof(dialups) / sizeof(dialups[0])) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "invalid dialup type '%s' in zone "
                                            "'%s'",
                                            str, znamestr);
@@ -3839,7 +3793,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        (void)cfg_map_get(goptions, "forwarders", &obj);
                }
        }
-       if (check_forward(config, zoptions, obj, logctx) != ISC_R_SUCCESS) {
+       if (check_forward(config, zoptions, obj) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
@@ -3863,7 +3817,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        if (obj == NULL ||
                            strcasecmp(cfg_obj_asstring(obj), "first") == 0)
                        {
-                               cfg_obj_log(zconfig, logctx, ISC_LOG_WARNING,
+                               cfg_obj_log(zconfig, ISC_LOG_WARNING,
                                            "inherited 'forward first;' for "
                                            "%s zone '%s' - did you want "
                                            "'forward only;'?",
@@ -3890,7 +3844,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        isc_netaddr_fromsockaddr(&na, &sa);
                        if (isc_netaddr_getzone(&na) != 0) {
                                result = ISC_R_FAILURE;
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "scoped address is not allowed "
                                            "for static stub "
                                            "server-addresses");
@@ -3921,13 +3875,13 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        tresult = dns_name_fromtext(sname, &b2, dns_rootname, 0,
                                                    NULL);
                        if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                            "server-name '%s' is not a valid "
                                            "name",
                                            snamestr);
                                result = ISC_R_FAILURE;
                        } else if (dns_name_issubdomain(sname, zname)) {
-                               cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                            "server-name '%s' must not be a "
                                            "subdomain of zone name '%s'",
                                            snamestr, znamestr);
@@ -3955,16 +3909,16 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                case ISC_R_SUCCESS:
                        break;
                case ISC_R_FILENOTFOUND:
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "key-directory: '%s' does not exist", dir);
                        break;
                case ISC_R_INVALIDFILE:
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "key-directory: '%s' is not a directory",
                                    dir);
                        break;
                default:
-                       cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(obj, ISC_LOG_WARNING,
                                    "key-directory: '%s' %s", dir,
                                    isc_result_totext(tresult));
                        result = tresult;
@@ -3978,11 +3932,10 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        if (zname != NULL) {
                if (has_dnssecpolicy) {
                        tresult = check_keydir(config, zconfig, zname, kaspname,
-                                              dir, keydirs, logctx, mctx);
+                                              dir, keydirs, mctx);
                } else {
                        tresult = keydirexist(zconfig, "key-directory", zname,
-                                             dir, kaspname, keydirs, logctx,
-                                             mctx);
+                                             dir, kaspname, keydirs, mctx);
                }
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
@@ -3992,8 +3945,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        /*
         * Check various options.
         */
-       tresult = check_options(zoptions, config, false, logctx, mctx,
-                               optlevel_zone);
+       tresult = check_options(zoptions, config, false, mctx, optlevel_zone);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
@@ -4013,7 +3965,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        obj = NULL;
        tresult = cfg_map_get(zoptions, "database", &obj);
        if (dlz && tresult == ISC_R_SUCCESS) {
-               cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(zconfig, ISC_LOG_ERROR,
                            "zone '%s': cannot specify both 'dlz' "
                            "and 'database'",
                            znamestr);
@@ -4033,7 +3985,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                      (ztype == CFG_ZONE_SECONDARY && res1 == ISC_R_SUCCESS &&
                       cfg_obj_asboolean(obj)))))
                {
-                       cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zconfig, ISC_LOG_ERROR,
                                    "zone '%s': missing 'file' entry",
                                    znamestr);
                        result = tresult;
@@ -4042,7 +3994,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                            ztype == CFG_ZONE_MIRROR || ddns ||
                            has_dnssecpolicy))
                {
-                       tresult = fileexist(fileobj, files, true, logctx);
+                       tresult = fileexist(fileobj, files, true);
                        if (tresult != ISC_R_SUCCESS) {
                                result = tresult;
                        }
@@ -4050,7 +4002,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                           (ztype == CFG_ZONE_PRIMARY ||
                            ztype == CFG_ZONE_HINT))
                {
-                       tresult = fileexist(fileobj, files, false, logctx);
+                       tresult = fileexist(fileobj, files, false);
                        if (tresult != ISC_R_SUCCESS) {
                                result = tresult;
                        }
@@ -4066,7 +4018,7 @@ typedef struct keyalgorithms {
 } algorithmtable;
 
 isc_result_t
-isccfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
+isccfg_check_key(const cfg_obj_t *key) {
        const cfg_obj_t *algobj = NULL;
        const cfg_obj_t *secretobj = NULL;
        const char *keyname = cfg_obj_asstring(cfg_map_getname(key));
@@ -4091,7 +4043,7 @@ isccfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
        (void)cfg_map_get(key, "algorithm", &algobj);
        (void)cfg_map_get(key, "secret", &secretobj);
        if (secretobj == NULL || algobj == NULL) {
-               cfg_obj_log(key, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(key, ISC_LOG_ERROR,
                            "key '%s' must have both 'secret' and "
                            "'algorithm' defined",
                            keyname);
@@ -4101,7 +4053,7 @@ isccfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
        isc_buffer_init(&buf, secretbuf, sizeof(secretbuf));
        result = isc_base64_decodestring(cfg_obj_asstring(secretobj), &buf);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(secretobj, logctx, ISC_LOG_ERROR, "bad secret '%s'",
+               cfg_obj_log(secretobj, ISC_LOG_ERROR, "bad secret '%s'",
                            isc_result_totext(result));
                return (result);
        }
@@ -4117,8 +4069,8 @@ isccfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
                }
        }
        if (algorithms[i].name == NULL) {
-               cfg_obj_log(algobj, logctx, ISC_LOG_ERROR,
-                           "unknown algorithm '%s'", algorithm);
+               cfg_obj_log(algobj, ISC_LOG_ERROR, "unknown algorithm '%s'",
+                           algorithm);
                return (ISC_R_NOTFOUND);
        }
        if (algorithm[len] == '-') {
@@ -4128,7 +4080,7 @@ isccfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
                        if (result == ISC_R_RANGE ||
                            digestbits > algorithms[i].size)
                        {
-                               cfg_obj_log(algobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(algobj, ISC_LOG_ERROR,
                                            "key '%s' digest-bits too large "
                                            "[%u..%u]",
                                            keyname, algorithms[i].size / 2,
@@ -4136,7 +4088,7 @@ isccfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
                                return (ISC_R_RANGE);
                        }
                        if ((digestbits % 8) != 0) {
-                               cfg_obj_log(algobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(algobj, ISC_LOG_ERROR,
                                            "key '%s' digest-bits not multiple"
                                            " of 8",
                                            keyname);
@@ -4148,13 +4100,13 @@ isccfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
                        if ((digestbits < (algorithms[i].size / 2U) ||
                             (digestbits < 80U)))
                        {
-                               cfg_obj_log(algobj, logctx, ISC_LOG_WARNING,
+                               cfg_obj_log(algobj, ISC_LOG_WARNING,
                                            "key '%s' digest-bits too small "
                                            "[<%u]",
                                            keyname, algorithms[i].size / 2);
                        }
                } else {
-                       cfg_obj_log(algobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(algobj, ISC_LOG_ERROR,
                                    "key '%s': unable to parse digest-bits",
                                    keyname);
                        return (result);
@@ -4164,8 +4116,7 @@ isccfg_check_key(const cfg_obj_t *key, isc_log_t *logctx) {
 }
 
 static isc_result_t
-fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable,
-         isc_log_t *logctx) {
+fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable) {
        isc_result_t result;
        isc_symvalue_t symvalue;
        unsigned int line;
@@ -4176,7 +4127,7 @@ fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable,
                if (writeable) {
                        file = cfg_obj_file(symvalue.as_cpointer);
                        line = cfg_obj_line(symvalue.as_cpointer);
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "writeable file '%s': already in use: "
                                    "%s:%u",
                                    cfg_obj_asstring(obj), file, line);
@@ -4187,7 +4138,7 @@ fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable,
                if (result == ISC_R_SUCCESS) {
                        file = cfg_obj_file(symvalue.as_cpointer);
                        line = cfg_obj_line(symvalue.as_cpointer);
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "writeable file '%s': already in use: "
                                    "%s:%u",
                                    cfg_obj_asstring(obj), file, line);
@@ -4206,7 +4157,7 @@ fileexist(const cfg_obj_t *obj, isc_symtab_t *symtab, bool writeable,
 static isc_result_t
 keydirexist(const cfg_obj_t *zcfg, const char *optname, dns_name_t *zname,
            const char *dirname, const char *kaspnamestr, isc_symtab_t *symtab,
-           isc_log_t *logctx, isc_mem_t *mctx) {
+           isc_mem_t *mctx) {
        isc_result_t result;
        isc_symvalue_t symvalue;
        char *symkey;
@@ -4224,7 +4175,7 @@ keydirexist(const cfg_obj_t *zcfg, const char *optname, dns_name_t *zname,
        keydir += strlen(keydir);
        n = snprintf(keydir, len, "/%s", (dirname == NULL) ? "." : dirname);
        if (n > len) {
-               cfg_obj_log(zcfg, logctx, ISC_LOG_WARNING,
+               cfg_obj_log(zcfg, ISC_LOG_WARNING,
                            "%s '%s' truncated because too long, may cause "
                            "false positives in key directory in use checks",
                            optname, (dirname == NULL) ? "." : dirname);
@@ -4251,7 +4202,7 @@ keydirexist(const cfg_obj_t *zcfg, const char *optname, dns_name_t *zname,
                        return (ISC_R_SUCCESS);
                }
 
-               cfg_obj_log(zcfg, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(zcfg, ISC_LOG_ERROR,
                            "%s '%s' already in use by zone %s with "
                            "policy %s: %s:%u",
                            optname, keydir,
@@ -4278,8 +4229,7 @@ keydirexist(const cfg_obj_t *zcfg, const char *optname, dns_name_t *zname,
  * Check the key contents for validity.
  */
 static isc_result_t
-check_keylist(const cfg_obj_t *keys, isc_symtab_t *symtab, isc_mem_t *mctx,
-             isc_log_t *logctx) {
+check_keylist(const cfg_obj_t *keys, isc_symtab_t *symtab, isc_mem_t *mctx) {
        char namebuf[DNS_NAME_FORMATSIZE];
        dns_fixedname_t fname;
        dns_name_t *name;
@@ -4301,12 +4251,12 @@ check_keylist(const cfg_obj_t *keys, isc_symtab_t *symtab, isc_mem_t *mctx,
                isc_buffer_add(&b, strlen(keyid));
                tresult = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(key, ISC_LOG_ERROR,
                                    "key '%s': bad key name", keyid);
                        result = tresult;
                        continue;
                }
-               tresult = isccfg_check_key(key, logctx);
+               tresult = isccfg_check_key(key);
                if (tresult != ISC_R_SUCCESS) {
                        return (tresult);
                }
@@ -4329,7 +4279,7 @@ check_keylist(const cfg_obj_t *keys, isc_symtab_t *symtab, isc_mem_t *mctx,
                        if (file == NULL) {
                                file = "<unknown file>";
                        }
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(key, ISC_LOG_ERROR,
                                    "key '%s': already exists "
                                    "previous definition: %s:%u",
                                    keyid, file, line);
@@ -4396,7 +4346,7 @@ static struct {
 
 static isc_result_t
 check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
-             isc_symtab_t *symtab, isc_mem_t *mctx, isc_log_t *logctx) {
+             isc_symtab_t *symtab, isc_mem_t *mctx) {
        dns_fixedname_t fname;
        isc_result_t result = ISC_R_SUCCESS;
        isc_result_t tresult;
@@ -4437,7 +4387,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
                if (tresult != ISC_R_SUCCESS) {
                        INSIST(tresult == ISC_R_FAILURE);
                        isc_netaddr_format(&n1, buf, sizeof(buf));
-                       cfg_obj_log(v1, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(v1, ISC_LOG_ERROR,
                                    "server '%s/%u': invalid prefix "
                                    "(extra bits specified)",
                                    buf, p1);
@@ -4458,7 +4408,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
                        (void)cfg_map_get(v1, xfr, &obj);
                        if (obj != NULL) {
                                isc_netaddr_format(&n1, buf, sizeof(buf));
-                               cfg_obj_log(v1, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(v1, ISC_LOG_ERROR,
                                            "server '%s/%u': %s not legal", buf,
                                            p1, xfr);
                                result = ISC_R_FAILURE;
@@ -4481,7 +4431,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
                                        cfg_obj_assockaddr(obj);
                                in_port_t port = isc_sockaddr_getport(sa);
                                if (port == dnsport) {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "'%s' cannot specify the "
                                                    "DNS listener port (%d)",
                                                    xfr, port);
@@ -4502,7 +4452,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
                                }
 
                                isc_netaddr_format(&n2, buf, sizeof(buf));
-                               cfg_obj_log(v2, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(v2, ISC_LOG_ERROR,
                                            "server '%s/%u': already exists "
                                            "previous definition: %s:%u",
                                            buf, p2, file, line);
@@ -4522,7 +4472,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
                        tresult = dns_name_fromtext(keyname, &b, dns_rootname,
                                                    0, NULL);
                        if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(keys, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(keys, ISC_LOG_ERROR,
                                            "bad key name '%s'", keyval);
                                result = ISC_R_FAILURE;
                                continue;
@@ -4530,7 +4480,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
                        dns_name_format(keyname, namebuf, sizeof(namebuf));
                        tresult = isc_symtab_lookup(symtab, namebuf, 1, NULL);
                        if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(keys, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(keys, ISC_LOG_ERROR,
                                            "unknown key '%s'", keyval);
                                result = ISC_R_FAILURE;
                        }
@@ -4543,7 +4493,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
                                tresult = (bools[i].set)(
                                        peer, cfg_obj_asboolean(opt));
                                if (tresult != ISC_R_SUCCESS) {
-                                       cfg_obj_log(opt, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(opt, ISC_LOG_ERROR,
                                                    "setting server option "
                                                    "'%s' failed: %s",
                                                    bools[i].name,
@@ -4564,8 +4514,7 @@ check_servers(const cfg_obj_t *config, const cfg_obj_t *voptions,
 #define ROOT_KSK_2017   0x08
 
 static isc_result_t
-check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp,
-                  isc_log_t *logctx) {
+check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp) {
        const char *str = NULL, *namestr = NULL;
        dns_fixedname_t fkeyname;
        dns_name_t *keyname = NULL;
@@ -4672,7 +4621,7 @@ check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp,
        isc_buffer_add(&b, strlen(namestr));
        result = dns_name_fromtext(keyname, &b, dns_rootname, 0, NULL);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(key, logctx, ISC_LOG_WARNING, "bad key name: %s\n",
+               cfg_obj_log(key, ISC_LOG_WARNING, "bad key name: %s\n",
                            isc_result_totext(result));
                result = ISC_R_FAILURE;
        }
@@ -4691,7 +4640,7 @@ check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp,
                } else if (strcasecmp(atstr, "initial-ds") == 0) {
                        anchortype = INIT_DS;
                } else {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(key, ISC_LOG_ERROR,
                                    "key '%s': "
                                    "invalid initialization method '%s'",
                                    namestr, atstr);
@@ -4713,21 +4662,21 @@ check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp,
        case STATIC_DNSKEY:
        case TRUSTED:
                if (rdata1 > 0xffff) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
-                                   "flags too big: %u", rdata1);
+                       cfg_obj_log(key, ISC_LOG_ERROR, "flags too big: %u",
+                                   rdata1);
                        result = ISC_R_RANGE;
                }
                if (rdata1 & DNS_KEYFLAG_REVOKE) {
-                       cfg_obj_log(key, logctx, ISC_LOG_WARNING,
+                       cfg_obj_log(key, ISC_LOG_WARNING,
                                    "key flags revoke bit set");
                }
                if (rdata2 > 0xff) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
-                                   "protocol too big: %u", rdata2);
+                       cfg_obj_log(key, ISC_LOG_ERROR, "protocol too big: %u",
+                                   rdata2);
                        result = ISC_R_RANGE;
                }
                if (rdata3 > 0xff) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(key, ISC_LOG_ERROR,
                                    "algorithm too big: %u\n", rdata3);
                        result = ISC_R_RANGE;
                }
@@ -4738,7 +4687,7 @@ check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp,
                tresult = isc_base64_decodestring(str, &b);
 
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR, "%s",
+                       cfg_obj_log(key, ISC_LOG_ERROR, "%s",
                                    isc_result_totext(tresult));
                        result = ISC_R_FAILURE;
                } else {
@@ -4747,7 +4696,7 @@ check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp,
                        if ((rdata3 == DST_ALG_RSASHA1) && r.length > 1 &&
                            r.base[0] == 1 && r.base[1] == 3)
                        {
-                               cfg_obj_log(key, logctx, ISC_LOG_WARNING,
+                               cfg_obj_log(key, ISC_LOG_WARNING,
                                            "%s '%s' has a weak exponent",
                                            atstr, namestr);
                        }
@@ -4785,17 +4734,17 @@ check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp,
        case INIT_DS:
        case STATIC_DS:
                if (rdata1 > 0xffff) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
-                                   "key tag too big: %u", rdata1);
+                       cfg_obj_log(key, ISC_LOG_ERROR, "key tag too big: %u",
+                                   rdata1);
                        result = ISC_R_RANGE;
                }
                if (rdata2 > 0xff) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(key, ISC_LOG_ERROR,
                                    "algorithm too big: %u\n", rdata2);
                        result = ISC_R_RANGE;
                }
                if (rdata3 > 0xff) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(key, ISC_LOG_ERROR,
                                    "digest type too big: %u", rdata3);
                        result = ISC_R_RANGE;
                }
@@ -4806,7 +4755,7 @@ check_trust_anchor(const cfg_obj_t *key, bool managed, unsigned int *flagsp,
                tresult = isc_hex_decodestring(str, &b);
 
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR, "%s",
+                       cfg_obj_log(key, ISC_LOG_ERROR, "%s",
                                    isc_result_totext(tresult));
                        result = ISC_R_FAILURE;
                }
@@ -4846,8 +4795,7 @@ cleanup:
 
 static isc_result_t
 record_static_keys(isc_symtab_t *symtab, isc_mem_t *mctx,
-                  const cfg_obj_t *keylist, isc_log_t *logctx,
-                  bool autovalidation) {
+                  const cfg_obj_t *keylist, bool autovalidation) {
        isc_result_t result, ret = ISC_R_SUCCESS;
        const cfg_listelt_t *elt;
        dns_fixedname_t fixed;
@@ -4897,7 +4845,7 @@ record_static_keys(isc_symtab_t *symtab, isc_mem_t *mctx,
                }
 
                if (autovalidation && dns_name_equal(name, dns_rootname)) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "static trust anchor for root zone "
                                    "cannot be used with "
                                    "'dnssec-validation auto'.");
@@ -4910,8 +4858,7 @@ record_static_keys(isc_symtab_t *symtab, isc_mem_t *mctx,
 }
 
 static isc_result_t
-check_initializing_keys(isc_symtab_t *symtab, const cfg_obj_t *keylist,
-                       isc_log_t *logctx) {
+check_initializing_keys(isc_symtab_t *symtab, const cfg_obj_t *keylist) {
        isc_result_t result, ret = ISC_R_SUCCESS;
        const cfg_listelt_t *elt;
        dns_fixedname_t fixed;
@@ -4951,7 +4898,7 @@ check_initializing_keys(isc_symtab_t *symtab, const cfg_obj_t *keylist,
                        if (file == NULL) {
                                file = "<unknown file>";
                        }
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "static and initializing keys "
                                    "cannot be used for the "
                                    "same domain. "
@@ -5021,7 +4968,7 @@ record_ds_keys(isc_symtab_t *symtab, isc_mem_t *mctx,
 static isc_result_t
 check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
                   const cfg_obj_t *global_tkeys, const cfg_obj_t *view_tkeys,
-                  bool autovalidation, isc_mem_t *mctx, isc_log_t *logctx) {
+                  bool autovalidation, isc_mem_t *mctx) {
        isc_result_t result, tresult;
        const cfg_listelt_t *elt = NULL;
        const cfg_obj_t *keylist = NULL;
@@ -5046,7 +4993,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
             elt = cfg_list_next(elt))
        {
                keylist = cfg_listelt_value(elt);
-               tresult = record_static_keys(statictab, mctx, keylist, logctx,
+               tresult = record_static_keys(statictab, mctx, keylist,
                                             autovalidation);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
@@ -5062,7 +5009,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
             elt = cfg_list_next(elt))
        {
                keylist = cfg_listelt_value(elt);
-               tresult = record_static_keys(statictab, mctx, keylist, logctx,
+               tresult = record_static_keys(statictab, mctx, keylist,
                                             autovalidation);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
@@ -5078,7 +5025,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
             elt = cfg_list_next(elt))
        {
                keylist = cfg_listelt_value(elt);
-               tresult = record_static_keys(statictab, mctx, keylist, logctx,
+               tresult = record_static_keys(statictab, mctx, keylist,
                                             autovalidation);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
@@ -5089,7 +5036,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
             elt = cfg_list_next(elt))
        {
                keylist = cfg_listelt_value(elt);
-               tresult = record_static_keys(statictab, mctx, keylist, logctx,
+               tresult = record_static_keys(statictab, mctx, keylist,
                                             autovalidation);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
@@ -5104,7 +5051,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
             elt = cfg_list_next(elt))
        {
                keylist = cfg_listelt_value(elt);
-               tresult = check_initializing_keys(statictab, keylist, logctx);
+               tresult = check_initializing_keys(statictab, keylist);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -5114,7 +5061,7 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
             elt = cfg_list_next(elt))
        {
                keylist = cfg_listelt_value(elt);
-               tresult = check_initializing_keys(statictab, keylist, logctx);
+               tresult = check_initializing_keys(statictab, keylist);
                if (result == ISC_R_SUCCESS) {
                        result = tresult;
                }
@@ -5134,7 +5081,7 @@ typedef enum { special_zonetype_rpz, special_zonetype_catz } special_zonetype_t;
 
 static isc_result_t
 check_rpz_catz(const char *rpz_catz, const cfg_obj_t *rpz_obj,
-              const char *viewname, isc_symtab_t *symtab, isc_log_t *logctx,
+              const char *viewname, isc_symtab_t *symtab,
               special_zonetype_t specialzonetype) {
        const cfg_listelt_t *element;
        const cfg_obj_t *obj, *nameobj, *zoneobj;
@@ -5166,7 +5113,7 @@ check_rpz_catz(const char *rpz_catz, const cfg_obj_t *rpz_obj,
 
                if (specialzonetype == special_zonetype_rpz) {
                        if (++num_zones > 64) {
-                               cfg_obj_log(nameobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(nameobj, ISC_LOG_ERROR,
                                            "more than 64 response policy "
                                            "zones in view '%s'",
                                            viewname);
@@ -5177,7 +5124,7 @@ check_rpz_catz(const char *rpz_catz, const cfg_obj_t *rpz_obj,
                tresult = dns_name_fromstring(name, zonename, dns_rootname, 0,
                                              NULL);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(nameobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(nameobj, ISC_LOG_ERROR,
                                    "bad domain name '%s'", zonename);
                        if (result == ISC_R_SUCCESS) {
                                result = tresult;
@@ -5204,7 +5151,7 @@ check_rpz_catz(const char *rpz_catz, const cfg_obj_t *rpz_obj,
                    strcasecmp(zonetype, "secondary") != 0 &&
                    strcasecmp(zonetype, "slave") != 0)
                {
-                       cfg_obj_log(nameobj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(nameobj, ISC_LOG_ERROR,
                                    "%s '%s'%s%s is not a primary or secondary "
                                    "zone",
                                    rpz_catz, zonename, forview, viewname);
@@ -5217,7 +5164,7 @@ check_rpz_catz(const char *rpz_catz, const cfg_obj_t *rpz_obj,
 }
 
 static isc_result_t
-check_rpz(const cfg_obj_t *rpz_obj, isc_log_t *logctx) {
+check_rpz(const cfg_obj_t *rpz_obj) {
        const cfg_listelt_t *element;
        const cfg_obj_t *obj, *nameobj, *edeobj;
        const char *zonename;
@@ -5237,8 +5184,8 @@ check_rpz(const cfg_obj_t *rpz_obj, isc_log_t *logctx) {
                tresult = dns_name_fromstring(name, zonename, dns_rootname, 0,
                                              NULL);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
-                                   "bad domain name '%s'", zonename);
+                       cfg_obj_log(obj, ISC_LOG_ERROR, "bad domain name '%s'",
+                                   zonename);
                        if (result == ISC_R_SUCCESS) {
                                result = tresult;
                                continue;
@@ -5250,7 +5197,7 @@ check_rpz(const cfg_obj_t *rpz_obj, isc_log_t *logctx) {
                        const char *str = cfg_obj_asstring(edeobj);
 
                        if (dns_rpz_str2ede(str) == UINT16_MAX) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "unsupported EDE type '%s'", str);
                                result = ISC_R_FAILURE;
                        }
@@ -5261,8 +5208,7 @@ check_rpz(const cfg_obj_t *rpz_obj, isc_log_t *logctx) {
 }
 
 static isc_result_t
-check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx,
-          isc_log_t *logctx) {
+check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx) {
        const cfg_listelt_t *element;
        const cfg_obj_t *obj, *nameobj, *primariesobj;
        const char *zonename;
@@ -5296,8 +5242,8 @@ check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx,
                tresult = dns_name_fromstring(name, zonename, dns_rootname, 0,
                                              NULL);
                if (tresult != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
-                                   "bad domain name '%s'", zonename);
+                       cfg_obj_log(obj, ISC_LOG_ERROR, "bad domain name '%s'",
+                                   zonename);
                        if (result == ISC_R_SUCCESS) {
                                result = tresult;
                                continue;
@@ -5307,7 +5253,7 @@ check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx,
                dns_name_format(name, namebuf, sizeof(namebuf));
                tresult = exists(nameobj, namebuf, 1, symtab,
                                 "catalog zone '%s': already added here %s:%u",
-                                logctx, mctx);
+                                mctx);
                if (tresult != ISC_R_SUCCESS) {
                        result = tresult;
                        continue;
@@ -5319,7 +5265,7 @@ check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx,
                        if (primariesobj != NULL &&
                            cfg_obj_istuple(primariesobj))
                        {
-                               cfg_obj_log(nameobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(nameobj, ISC_LOG_ERROR,
                                            "catalog zone '%s'%s%s: "
                                            "'default-primaries' and "
                                            "'default-masters' can not be both "
@@ -5343,7 +5289,6 @@ check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx,
  */
 struct check_one_plugin_data {
        isc_mem_t *mctx;
-       isc_log_t *lctx;
        cfg_aclconfctx_t *actx;
        isc_result_t *check_result;
 };
@@ -5366,7 +5311,7 @@ check_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
        result = ns_plugin_expandpath(plugin_path, full_path,
                                      sizeof(full_path));
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, data->lctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "%s: plugin check failed: "
                            "unable to get full plugin path: %s",
                            plugin_path, isc_result_totext(result));
@@ -5375,11 +5320,10 @@ check_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
 
        result = ns_plugin_check(full_path, parameters, config,
                                 cfg_obj_file(obj), cfg_obj_line(obj),
-                                data->mctx, data->lctx, data->actx);
+                                data->mctx, data->actx);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(obj, data->lctx, ISC_LOG_ERROR,
-                           "%s: plugin check failed: %s", full_path,
-                           isc_result_totext(result));
+               cfg_obj_log(obj, ISC_LOG_ERROR, "%s: plugin check failed: %s",
+                           full_path, isc_result_totext(result));
                *data->check_result = result;
        }
 
@@ -5387,8 +5331,7 @@ check_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
 }
 
 static isc_result_t
-check_dnstap(const cfg_obj_t *voptions, const cfg_obj_t *config,
-            isc_log_t *logctx) {
+check_dnstap(const cfg_obj_t *voptions, const cfg_obj_t *config) {
 #ifdef HAVE_DNSTAP
        const cfg_obj_t *options = NULL;
        const cfg_obj_t *obj = NULL;
@@ -5407,7 +5350,7 @@ check_dnstap(const cfg_obj_t *voptions, const cfg_obj_t *config,
                        (void)cfg_map_get(options, "dnstap", &obj);
                }
                if (obj != NULL) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "'dnstap-output' must be set if 'dnstap' "
                                    "is set");
                        return (ISC_R_FAILURE);
@@ -5417,7 +5360,6 @@ check_dnstap(const cfg_obj_t *voptions, const cfg_obj_t *config,
 #else  /* ifdef HAVE_DNSTAP */
        UNUSED(voptions);
        UNUSED(config);
-       UNUSED(logctx);
 
        return (ISC_R_SUCCESS);
 #endif /* ifdef HAVE_DNSTAP */
@@ -5427,7 +5369,7 @@ static isc_result_t
 check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
               const char *viewname, dns_rdataclass_t vclass,
               isc_symtab_t *files, isc_symtab_t *keydirs, unsigned int flags,
-              isc_symtab_t *inview, isc_log_t *logctx, isc_mem_t *mctx) {
+              isc_symtab_t *inview, isc_mem_t *mctx) {
        const cfg_obj_t *zones = NULL;
        const cfg_obj_t *view_tkeys = NULL, *global_tkeys = NULL;
        const cfg_obj_t *view_mkeys = NULL, *global_mkeys = NULL;
@@ -5487,7 +5429,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
 
                tresult = check_zoneconf(zone, voptions, config, symtab, files,
                                         keydirs, inview, viewname, vclass,
-                                        actx, logctx, mctx);
+                                        actx, mctx);
                if (tresult != ISC_R_SUCCESS) {
                        result = ISC_R_FAILURE;
                }
@@ -5502,7 +5444,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                if ((cfg_map_get(opts, "response-policy", &obj) ==
                     ISC_R_SUCCESS) &&
                    (check_rpz_catz("response-policy zone", obj, viewname,
-                                   symtab, logctx,
+                                   symtab,
                                    special_zonetype_rpz) != ISC_R_SUCCESS))
                {
                        result = ISC_R_FAILURE;
@@ -5512,7 +5454,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                if ((cfg_map_get(opts, "catalog-zones", &obj) ==
                     ISC_R_SUCCESS) &&
                    (check_rpz_catz("catalog zone", obj, viewname, symtab,
-                                   logctx,
+
                                    special_zonetype_catz) != ISC_R_SUCCESS))
                {
                        result = ISC_R_FAILURE;
@@ -5526,7 +5468,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                obj = NULL;
                if ((cfg_map_get(opts, "response-policy", &obj) ==
                     ISC_R_SUCCESS) &&
-                   (check_rpz(obj, logctx) != ISC_R_SUCCESS))
+                   (check_rpz(obj) != ISC_R_SUCCESS))
                {
                        result = ISC_R_FAILURE;
                }
@@ -5539,7 +5481,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                obj = NULL;
                if ((cfg_map_get(opts, "catalog-zones", &obj) ==
                     ISC_R_SUCCESS) &&
-                   (check_catz(obj, viewname, mctx, logctx) != ISC_R_SUCCESS))
+                   (check_catz(obj, viewname, mctx) != ISC_R_SUCCESS))
                {
                        result = ISC_R_FAILURE;
                }
@@ -5550,8 +5492,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        /*
         * Check that forwarding is reasonable.
         */
-       if (opts != NULL &&
-           check_forward(config, opts, NULL, logctx) != ISC_R_SUCCESS)
+       if (opts != NULL && check_forward(config, opts, NULL) != ISC_R_SUCCESS)
        {
                result = ISC_R_FAILURE;
        }
@@ -5559,27 +5500,24 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        /*
         * Check non-zero options at the global and view levels.
         */
-       if (options != NULL && check_nonzero(options, logctx) != ISC_R_SUCCESS)
-       {
+       if (options != NULL && check_nonzero(options) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
-       if (voptions != NULL &&
-           check_nonzero(voptions, logctx) != ISC_R_SUCCESS)
-       {
+       if (voptions != NULL && check_nonzero(voptions) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
        /*
         * Check that dual-stack-servers is reasonable.
         */
-       if (opts != NULL && check_dual_stack(opts, logctx) != ISC_R_SUCCESS) {
+       if (opts != NULL && check_dual_stack(opts) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
        /*
         * Check that rrset-order is reasonable.
         */
-       if (opts != NULL && check_order(opts, logctx) != ISC_R_SUCCESS) {
+       if (opts != NULL && check_order(opts) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
@@ -5593,7 +5531,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        }
 
        (void)cfg_map_get(config, "key", &keys);
-       tresult = check_keylist(keys, symtab, mctx, logctx);
+       tresult = check_keylist(keys, symtab, mctx);
        if (tresult == ISC_R_EXISTS) {
                result = ISC_R_FAILURE;
        } else if (tresult != ISC_R_SUCCESS) {
@@ -5604,7 +5542,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        if (voptions != NULL) {
                keys = NULL;
                (void)cfg_map_get(voptions, "key", &keys);
-               tresult = check_keylist(keys, symtab, mctx, logctx);
+               tresult = check_keylist(keys, symtab, mctx);
                if (tresult == ISC_R_EXISTS) {
                        result = ISC_R_FAILURE;
                } else if (tresult != ISC_R_SUCCESS) {
@@ -5616,9 +5554,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        /*
         * Global servers can refer to keys in views.
         */
-       if (check_servers(config, voptions, symtab, mctx, logctx) !=
-           ISC_R_SUCCESS)
-       {
+       if (check_servers(config, voptions, symtab, mctx) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
@@ -5655,8 +5591,8 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                                     element2 = cfg_list_next(element2))
                                {
                                        obj = cfg_listelt_value(element2);
-                                       tresult = check_trust_anchor(
-                                               obj, false, &taflags, logctx);
+                                       tresult = check_trust_anchor(obj, false,
+                                                                    &taflags);
                                        if (tresult != ISC_R_SUCCESS) {
                                                result = tresult;
                                        }
@@ -5664,8 +5600,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                        }
 
                        if ((taflags & ROOT_KSK_STATIC) != 0) {
-                               cfg_obj_log(check_keys[i], logctx,
-                                           ISC_LOG_WARNING,
+                               cfg_obj_log(check_keys[i], ISC_LOG_WARNING,
                                            "trusted-keys entry for the root "
                                            "zone WILL FAIL after key "
                                            "rollover - use trust-anchors "
@@ -5685,7 +5620,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        {
                keys = (view_mkeys != NULL) ? view_mkeys : global_mkeys;
 
-               cfg_obj_log(keys, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(keys, ISC_LOG_ERROR,
                            "use of managed-keys is not allowed when "
                            "trust-anchors is also in use");
                result = ISC_R_FAILURE;
@@ -5712,8 +5647,8 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                                     element2 = cfg_list_next(element2))
                                {
                                        obj = cfg_listelt_value(element2);
-                                       tresult = check_trust_anchor(
-                                               obj, true, &taflags, logctx);
+                                       tresult = check_trust_anchor(obj, true,
+                                                                    &taflags);
                                        if (tresult != ISC_R_SUCCESS) {
                                                result = tresult;
                                        }
@@ -5721,8 +5656,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                        }
 
                        if ((taflags & ROOT_KSK_STATIC) != 0) {
-                               cfg_obj_log(check_keys[i], logctx,
-                                           ISC_LOG_WARNING,
+                               cfg_obj_log(check_keys[i], ISC_LOG_WARNING,
                                            "static entry for the root "
                                            "zone WILL FAIL after key "
                                            "rollover - use trust-anchors "
@@ -5733,8 +5667,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                        if ((taflags & ROOT_KSK_2010) != 0 &&
                            (taflags & ROOT_KSK_2017) == 0)
                        {
-                               cfg_obj_log(check_keys[i], logctx,
-                                           ISC_LOG_WARNING,
+                               cfg_obj_log(check_keys[i], ISC_LOG_WARNING,
                                            "initial-key entry for the root "
                                            "zone uses the 2010 key without "
                                            "the updated 2017 key");
@@ -5746,14 +5679,14 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
 
        if ((tflags & ROOT_KSK_ANY) != 0 && (dflags & ROOT_KSK_ANY) != 0) {
                keys = (view_ta != NULL) ? view_ta : global_ta;
-               cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+               cfg_obj_log(keys, ISC_LOG_WARNING,
                            "both trusted-keys and trust-anchors "
                            "for the root zone are present");
        }
 
        if ((dflags & ROOT_KSK_ANY) == ROOT_KSK_ANY) {
                keys = (view_ta != NULL) ? view_ta : global_ta;
-               cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+               cfg_obj_log(keys, ISC_LOG_WARNING,
                            "both initial and static entries for the "
                            "root zone are present");
        }
@@ -5772,7 +5705,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
                        if (global_ta == NULL && view_ta == NULL &&
                            global_tkeys == NULL && view_tkeys == NULL)
                        {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "the 'dnssec-validation yes' "
                                            "option requires configured "
                                            "'trust-anchors'; consider using "
@@ -5783,7 +5716,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        }
 
        tresult = check_ta_conflicts(global_ta, view_ta, global_tkeys,
-                                    view_tkeys, autovalidation, mctx, logctx);
+                                    view_tkeys, autovalidation, mctx);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
@@ -5792,43 +5725,42 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
         * Check options.
         */
        if (voptions != NULL) {
-               tresult = check_options(voptions, NULL, check_algorithms,
-                                       logctx, mctx, optlevel_view);
+               tresult = check_options(voptions, NULL, check_algorithms, mctx,
+                                       optlevel_view);
        } else {
-               tresult = check_options(config, config, check_algorithms,
-                                       logctx, mctx, optlevel_config);
+               tresult = check_options(config, config, check_algorithms, mctx,
+                                       optlevel_config);
        }
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
 
-       tresult = check_dnstap(voptions, config, logctx);
+       tresult = check_dnstap(voptions, config);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
 
-       tresult = check_viewacls(actx, voptions, config, logctx, mctx);
+       tresult = check_viewacls(actx, voptions, config, mctx);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
 
-       tresult = check_recursionacls(actx, voptions, viewname, config, logctx,
-                                     mctx);
+       tresult = check_recursionacls(actx, voptions, viewname, config, mctx);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
 
-       tresult = check_dns64(actx, voptions, config, logctx, mctx);
+       tresult = check_dns64(actx, voptions, config, mctx);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
 
-       tresult = check_ratelimit(actx, voptions, config, logctx, mctx);
+       tresult = check_ratelimit(actx, voptions, config, mctx);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
 
-       tresult = check_fetchlimit(voptions, config, logctx);
+       tresult = check_fetchlimit(voptions, config);
        if (tresult != ISC_R_SUCCESS) {
                result = tresult;
        }
@@ -5847,12 +5779,11 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
        {
                struct check_one_plugin_data check_one_plugin_data = {
                        .mctx = mctx,
-                       .lctx = logctx,
                        .actx = actx,
                        .check_result = &tresult,
                };
 
-               (void)cfg_pluginlist_foreach(config, plugin_list, logctx,
+               (void)cfg_pluginlist_foreach(config, plugin_list,
                                             check_one_plugin,
                                             &check_one_plugin_data);
                if (tresult != ISC_R_SUCCESS) {
@@ -5875,7 +5806,7 @@ static const char *default_channels[] = { "default_syslog", "default_stderr",
                                          "default_debug", "null", NULL };
 
 static isc_result_t
-check_logging(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
+check_logging(const cfg_obj_t *config, isc_mem_t *mctx) {
        const cfg_obj_t *categories = NULL;
        const cfg_obj_t *category;
        const cfg_obj_t *channels = NULL;
@@ -5938,7 +5869,7 @@ check_logging(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
                        i++;
                }
                if (i != 1) {
-                       cfg_obj_log(channel, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(channel, ISC_LOG_ERROR,
                                    "channel '%s': exactly one of file, "
                                    "syslog, "
                                    "null, and stderr must be present",
@@ -5957,8 +5888,8 @@ check_logging(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
        {
                category = cfg_listelt_value(element);
                catname = cfg_obj_asstring(cfg_tuple_get(category, "name"));
-               if (isc_log_categorybyname(logctx, catname) == NULL) {
-                       cfg_obj_log(category, logctx, ISC_LOG_ERROR,
+               if (isc_log_categorybyname(catname) == NULL) {
+                       cfg_obj_log(category, ISC_LOG_ERROR,
                                    "undefined category: '%s'", catname);
                        result = ISC_R_FAILURE;
                }
@@ -5971,7 +5902,7 @@ check_logging(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
                        tresult = isc_symtab_lookup(symtab, channelname, 1,
                                                    &symvalue);
                        if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(channel, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(channel, ISC_LOG_ERROR,
                                            "undefined channel: '%s'",
                                            channelname);
                                result = tresult;
@@ -5983,8 +5914,7 @@ check_logging(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
 }
 
 static isc_result_t
-check_controlskeys(const cfg_obj_t *control, const cfg_obj_t *keylist,
-                  isc_log_t *logctx) {
+check_controlskeys(const cfg_obj_t *control, const cfg_obj_t *keylist) {
        isc_result_t result = ISC_R_SUCCESS;
        const cfg_obj_t *control_keylist;
        const cfg_listelt_t *element;
@@ -6003,8 +5933,8 @@ check_controlskeys(const cfg_obj_t *control, const cfg_obj_t *keylist,
                keyval = cfg_obj_asstring(key);
 
                if (!rndckey_exists(keylist, keyval)) {
-                       cfg_obj_log(key, logctx, ISC_LOG_ERROR,
-                                   "unknown key '%s'", keyval);
+                       cfg_obj_log(key, ISC_LOG_ERROR, "unknown key '%s'",
+                                   keyval);
                        result = ISC_R_NOTFOUND;
                }
        }
@@ -6012,7 +5942,7 @@ check_controlskeys(const cfg_obj_t *control, const cfg_obj_t *keylist,
 }
 
 static isc_result_t
-check_controls(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
+check_controls(const cfg_obj_t *config, isc_mem_t *mctx) {
        isc_result_t result = ISC_R_SUCCESS, tresult;
        cfg_aclconfctx_t *actx = NULL;
        const cfg_listelt_t *element, *element2;
@@ -6062,15 +5992,15 @@ check_controls(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
 
                        control = cfg_listelt_value(element2);
                        allow = cfg_tuple_get(control, "allow");
-                       tresult = cfg_acl_fromconfig(allow, config, logctx,
-                                                    actx, mctx, 0, &acl);
+                       tresult = cfg_acl_fromconfig(allow, config, actx, mctx,
+                                                    0, &acl);
                        if (acl != NULL) {
                                dns_acl_detach(&acl);
                        }
                        if (tresult != ISC_R_SUCCESS) {
                                result = tresult;
                        }
-                       tresult = check_controlskeys(control, keylist, logctx);
+                       tresult = check_controlskeys(control, keylist);
                        if (tresult != ISC_R_SUCCESS) {
                                result = tresult;
                        }
@@ -6084,7 +6014,7 @@ check_controls(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
                                obj, socktext, 1, symtab,
                                "inet control socket '%s': already defined, "
                                "previous definition: %s:%u",
-                               logctx, mctx);
+                               mctx);
                        if (tresult != ISC_R_SUCCESS) {
                                result = tresult;
                        }
@@ -6094,7 +6024,7 @@ check_controls(const cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
                {
                        control = cfg_listelt_value(element2);
                        path = cfg_obj_asstring(cfg_tuple_get(control, "path"));
-                       cfg_obj_log(control, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(control, ISC_LOG_ERROR,
                                    "unix control '%s': not supported", path);
                        result = ISC_R_FAMILYNOSUPPORT;
                }
@@ -6109,7 +6039,7 @@ cleanup:
 
 isc_result_t
 isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
-                      isc_log_t *logctx, isc_mem_t *mctx) {
+                      isc_mem_t *mctx) {
        const cfg_obj_t *options = NULL;
        const cfg_obj_t *views = NULL;
        const cfg_obj_t *acls = NULL;
@@ -6128,42 +6058,42 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
        (void)cfg_map_get(config, "options", &options);
 
        if (options != NULL &&
-           check_options(options, config, check_algorithms, logctx, mctx,
+           check_options(options, config, check_algorithms, mctx,
                          optlevel_options) != ISC_R_SUCCESS)
        {
                result = ISC_R_FAILURE;
        }
 
-       if (check_logging(config, logctx, mctx) != ISC_R_SUCCESS) {
+       if (check_logging(config, mctx) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
-       if (check_controls(config, logctx, mctx) != ISC_R_SUCCESS) {
+       if (check_controls(config, mctx) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
-       if (check_primarylists(config, logctx, mctx) != ISC_R_SUCCESS) {
+       if (check_primarylists(config, mctx) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
-       if (check_parentalagentlists(config, logctx, mctx) != ISC_R_SUCCESS) {
+       if (check_parentalagentlists(config, mctx) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
 #if HAVE_LIBNGHTTP2
-       if (check_httpservers(config, logctx, mctx) != ISC_R_SUCCESS) {
+       if (check_httpservers(config, mctx) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 #endif /* HAVE_LIBNGHTTP2 */
 
-       if (check_tls_definitions(config, logctx, mctx) != ISC_R_SUCCESS) {
+       if (check_tls_definitions(config, mctx) != ISC_R_SUCCESS) {
                result = ISC_R_FAILURE;
        }
 
        (void)cfg_map_get(config, "view", &views);
 
        if (views != NULL && options != NULL) {
-               if (check_dual_stack(options, logctx) != ISC_R_SUCCESS) {
+               if (check_dual_stack(options) != ISC_R_SUCCESS) {
                        result = ISC_R_FAILURE;
 
                        /*
@@ -6200,8 +6130,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
 
        if (views == NULL) {
                tresult = check_viewconf(config, NULL, NULL, dns_rdataclass_in,
-                                        files, keydirs, flags, inview, logctx,
-                                        mctx);
+                                        files, keydirs, flags, inview, mctx);
                if (result == ISC_R_SUCCESS && tresult != ISC_R_SUCCESS) {
                        result = ISC_R_FAILURE;
                }
@@ -6211,7 +6140,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
 
                (void)cfg_map_get(config, "zone", &zones);
                if (zones != NULL) {
-                       cfg_obj_log(zones, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(zones, ISC_LOG_ERROR,
                                    "when using 'view' statements, "
                                    "all zones must be in views");
                        result = ISC_R_FAILURE;
@@ -6219,7 +6148,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
 
                (void)cfg_map_get(config, "plugin", &plugins);
                if (plugins != NULL) {
-                       cfg_obj_log(plugins, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(plugins, ISC_LOG_ERROR,
                                    "when using 'view' statements, "
                                    "all plugins must be defined in views");
                        result = ISC_R_FAILURE;
@@ -6251,7 +6180,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
                        r.length = strlen(r.base);
                        tresult = dns_rdataclass_fromtext(&vclass, &r);
                        if (tresult != ISC_R_SUCCESS) {
-                               cfg_obj_log(vclassobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(vclassobj, ISC_LOG_ERROR,
                                            "view '%s': invalid class %s",
                                            cfg_obj_asstring(vname), r.base);
                        }
@@ -6271,7 +6200,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
                                              ISC_R_SUCCESS);
                                file = cfg_obj_file(symvalue.as_cpointer);
                                line = cfg_obj_line(symvalue.as_cpointer);
-                               cfg_obj_log(view, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(view, ISC_LOG_ERROR,
                                            "view '%s': already exists "
                                            "previous definition: %s:%u",
                                            key, file, line);
@@ -6281,7 +6210,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
                                   (strcasecmp(key, "_default") == 0 &&
                                    vclass == dns_rdataclass_in))
                        {
-                               cfg_obj_log(view, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(view, ISC_LOG_ERROR,
                                            "attempt to redefine builtin view "
                                            "'%s'",
                                            key);
@@ -6291,7 +6220,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
                if (tresult == ISC_R_SUCCESS) {
                        tresult = check_viewconf(config, voptions, key, vclass,
                                                 files, keydirs, flags, inview,
-                                                logctx, mctx);
+                                                mctx);
                }
                if (tresult != ISC_R_SUCCESS) {
                        result = ISC_R_FAILURE;
@@ -6318,8 +6247,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
                        {
                                if (strcasecmp(aclname, builtin[i]) == 0) {
                                        {
-                                               cfg_obj_log(acl, logctx,
-                                                           ISC_LOG_ERROR,
+                                               cfg_obj_log(acl, ISC_LOG_ERROR,
                                                            "attempt to "
                                                            "redefine "
                                                            "builtin acl '%s'",
@@ -6344,7 +6272,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
                                                file = "<unknown file>";
                                        }
 
-                                       cfg_obj_log(acl2, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(acl2, ISC_LOG_ERROR,
                                                    "attempt to redefine "
                                                    "acl '%s' previous "
                                                    "definition: %s:%u",
index 3d70f922e7de035a038a85e5b589c9207f8a5068..f40cbb60ed375eea2f2b60df6751e5a1aa0aa958 100644 (file)
@@ -58,7 +58,7 @@ cfg_aclconfctx_attach(cfg_aclconfctx_t *src, cfg_aclconfctx_t **dest);
 
 isc_result_t
 cfg_acl_fromconfig(const cfg_obj_t *caml, const cfg_obj_t *cctx,
-                  isc_log_t *lctx, cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
+                  cfg_aclconfctx_t *ctx, isc_mem_t *mctx,
                   unsigned int nest_level, dns_acl_t **target);
 /*
  * Construct a new dns_acl_t from configuration data in 'caml' and
index f790cd4377f2865f3f069c1edccf4bd8e39a3e76..537f8073ca97d10ece5ecaab9d874aef54a92982 100644 (file)
@@ -87,10 +87,10 @@ cfg_parser_attach(cfg_parser_t *src, cfg_parser_t **dest);
  */
 
 isc_result_t
-cfg_parser_create(isc_mem_t *mctx, isc_log_t *lctx, cfg_parser_t **ret);
+cfg_parser_create(isc_mem_t *mctx, cfg_parser_t **ret);
 /*%<
  * Create a configuration file parser.  Any warning and error
- * messages will be logged to 'lctx'.
+ * messages will be logged.
  *
  * The parser object returned can be used for a single call
  * to cfg_parse_file() or cfg_parse_buffer().  It must not
@@ -557,8 +557,8 @@ cfg_obj_destroy(cfg_parser_t *pctx, cfg_obj_t **obj);
  */
 
 void
-cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt,
-           ...) ISC_FORMAT_PRINTF(4, 5);
+cfg_obj_log(const cfg_obj_t *obj, int level, const char *fmt, ...)
+       ISC_FORMAT_PRINTF(3, 4);
 /*%<
  * Log a message concerning configuration object 'obj' to the logging
  * channel of 'pctx', at log level 'level'.  The message will be prefixed
@@ -604,15 +604,13 @@ typedef isc_result_t(pluginlist_cb_t)(const cfg_obj_t *config,
 
 isc_result_t
 cfg_pluginlist_foreach(const cfg_obj_t *config, const cfg_obj_t *list,
-                      isc_log_t *lctx, pluginlist_cb_t *callback,
-                      void *callback_data);
+                      pluginlist_cb_t *callback, void *callback_data);
 /*%<
  * For every "plugin" stanza present in 'list' (which in turn is a part of
  * 'config'), invoke the given 'callback', passing 'callback_data' to it along
  * with a fixed set of arguments (see the definition of the #pluginlist_cb_t
- * type).  Use logging context 'lctx' for logging error messages.  Interrupt
- * processing if 'callback' returns something else than #ISC_R_SUCCESS for any
- * element of 'list'.
+ * type).  Interrupt processing if 'callback' returns something else than
+ * #ISC_R_SUCCESS for any element of 'list'.
  *
  * Requires:
  *
index aa38a8c4b5710eba60eebcc226ed501f3edb31a0..053ed3e9958c59e69058990cb6fce3abe53b547d 100644 (file)
@@ -46,7 +46,7 @@ ISC_LANG_BEGINDECLS
 
 isc_result_t
 isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
-                      isc_log_t *logctx, isc_mem_t *mctx);
+                      isc_mem_t *mctx);
 /*%<
  * Check the syntactic validity of a configuration parse tree generated from
  * a named.conf file.
@@ -65,7 +65,7 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
  */
 
 isc_result_t
-isccfg_check_key(const cfg_obj_t *config, isc_log_t *logctx);
+isccfg_check_key(const cfg_obj_t *config);
 /*%<
  * Same as isccfg_check_namedconf(), but for a single 'key' statement.
  */
index 17c6af3a6067367cbeef6788806bbfa14fb3eff3..8734977966fced6ec5d6b66673328618c7a473cc 100644 (file)
@@ -199,7 +199,6 @@ struct cfg_listelt {
 /*% The parser object. */
 struct cfg_parser {
        isc_mem_t   *mctx;
-       isc_log_t   *lctx;
        isc_lex_t   *lexer;
        unsigned int errors;
        unsigned int warnings;
index b558d13d272560f6bc4145353622d620c2480db3..d717998ba0c68f80a5152393c1276596a21d0407 100644 (file)
@@ -25,7 +25,7 @@ ISC_LANG_BEGINDECLS
 
 isc_result_t
 cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
-                   bool check_algorithms, isc_mem_t *mctx, isc_log_t *logctx,
+                   bool check_algorithms, isc_mem_t *mctx,
                    dns_keystorelist_t *keystorelist, dns_kasplist_t *kasplist,
                    dns_kasp_t **kaspp);
 /*%<
@@ -62,8 +62,8 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
 
 isc_result_t
 cfg_keystore_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
-                       isc_log_t *logctx, dns_keystorelist_t *keystorelist,
-                       dns_keystore_t **kspp);
+                       dns_keystorelist_t *keystorelist,
+                       dns_keystore_t    **kspp);
 /*%<
  * Create and configure a key store. If a 'keystorelist' is provided, a lookup
  * happens and if a keystore already exists with the same name, no new one is
index 8af309502153b939a72886d935624c1627fc2fce..53bc2a48a1df4ad830d5afe32c5505bb97ef1958 100644 (file)
@@ -28,14 +28,12 @@ extern isc_logmodule_t       cfg_modules[];
 ISC_LANG_BEGINDECLS
 
 void
-cfg_log_init(isc_log_t *lctx);
+cfg_log_init(void);
 /*%<
  * Make the libisccfg categories and modules available for use with the
  * ISC logging library.
  *
  * Requires:
- *\li  lctx is a valid logging context.
- *
  *\li  cfg_log_init() is called only once.
  *
  * Ensures:
index 96fdf2e8147f1dbd02482f581ae14e82c279fdc1..7dad436449f5ed62b0c721674b956d6259c2500d 100644 (file)
@@ -112,8 +112,7 @@ get_string(const cfg_obj_t **maps, const char *option) {
  */
 static isc_result_t
 cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
-                      bool check_algorithms, isc_log_t *logctx,
-                      dns_keystorelist_t *keystorelist,
+                      bool check_algorithms, dns_keystorelist_t *keystorelist,
                       uint32_t ksk_min_lifetime, uint32_t zsk_min_lifetime) {
        isc_result_t result;
        dns_kasp_key_t *key = NULL;
@@ -163,13 +162,13 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                result = dns_keystorelist_find(keystorelist, keydir,
                                               &key->keystore);
                if (result == ISC_R_NOTFOUND) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnssec-policy: keystore %s does not exist",
                                    keydir);
                        result = ISC_R_FAILURE;
                        goto cleanup;
                } else if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnssec-policy: bad keystore %s", keydir);
                        result = ISC_R_FAILURE;
                        goto cleanup;
@@ -183,7 +182,7 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                }
                if (key->lifetime > 0) {
                        if (key->lifetime < 30 * (24 * 3600)) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                               cfg_obj_log(obj, ISC_LOG_WARNING,
                                            "dnssec-policy: key lifetime is "
                                            "shorter than 30 days");
                        }
@@ -198,7 +197,7 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                                error = true;
                        }
                        if (error) {
-                               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(obj, ISC_LOG_ERROR,
                                            "dnssec-policy: key lifetime is "
                                            "shorter than the time it takes to "
                                            "do a rollover");
@@ -213,7 +212,7 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                result = dns_secalg_fromtext(&key->algorithm,
                                             (isc_textregion_t *)&alg);
                if (result != ISC_R_SUCCESS) {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnssec-policy: bad algorithm %s",
                                    alg.base);
                        result = DNS_R_BADALG;
@@ -224,7 +223,7 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                    (key->algorithm == DNS_KEYALG_RSASHA1 ||
                     key->algorithm == DNS_KEYALG_NSEC3RSASHA1))
                {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnssec-policy: algorithm %s not supported "
                                    "in FIPS mode",
                                    alg.base);
@@ -235,7 +234,7 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                if (check_algorithms &&
                    !dst_algorithm_supported(key->algorithm))
                {
-                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "dnssec-policy: algorithm %s not supported",
                                    alg.base);
                        result = DNS_R_BADALG;
@@ -258,7 +257,7 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                                        min = DNS_KEYALG_RSASHA512 ? 1024 : 512;
                                }
                                if (size < min || size > 4096) {
-                                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                                    "dnssec-policy: key with "
                                                    "algorithm %s has invalid "
                                                    "key length %u",
@@ -271,7 +270,7 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                        case DNS_KEYALG_ECDSA384:
                        case DNS_KEYALG_ED25519:
                        case DNS_KEYALG_ED448:
-                               cfg_obj_log(obj, logctx, ISC_LOG_WARNING,
+                               cfg_obj_log(obj, ISC_LOG_WARNING,
                                            "dnssec-policy: key algorithm %s "
                                            "has predefined length; ignoring "
                                            "length value %u",
@@ -294,8 +293,7 @@ cleanup:
 }
 
 static isc_result_t
-cfg_nsec3param_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
-                         isc_log_t *logctx) {
+cfg_nsec3param_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp) {
        dns_kasp_key_t *kkey;
        unsigned int min_keysize = 4096;
        const cfg_obj_t *obj = NULL;
@@ -333,14 +331,14 @@ cfg_nsec3param_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                char algstr[DNS_SECALG_FORMATSIZE];
                dns_secalg_format((dns_secalg_t)badalg, algstr, sizeof(algstr));
                cfg_obj_log(
-                       obj, logctx, ISC_LOG_ERROR,
+                       obj, ISC_LOG_ERROR,
                        "dnssec-policy: cannot use nsec3 with algorithm '%s'",
                        algstr);
                return (DNS_R_NSEC3BADALG);
        }
 
        if (iter != DEFAULT_NSEC3PARAM_ITER) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "dnssec-policy: nsec3 iterations value %u "
                            "not allowed, must be zero",
                            iter);
@@ -359,7 +357,7 @@ cfg_nsec3param_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
                saltlen = cfg_obj_asuint32(obj);
        }
        if (saltlen > 0xff) {
-               cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(obj, ISC_LOG_ERROR,
                            "dnssec-policy: nsec3 salt length %u too high",
                            saltlen);
                return (DNS_R_NSEC3SALTRANGE);
@@ -370,7 +368,7 @@ cfg_nsec3param_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
 }
 
 static isc_result_t
-add_digest(dns_kasp_t *kasp, const cfg_obj_t *digest, isc_log_t *logctx) {
+add_digest(dns_kasp_t *kasp, const cfg_obj_t *digest) {
        isc_result_t result = ISC_R_SUCCESS;
        isc_textregion_t r;
        dns_dsdigest_t alg;
@@ -380,11 +378,11 @@ add_digest(dns_kasp_t *kasp, const cfg_obj_t *digest, isc_log_t *logctx) {
        r.length = strlen(str);
        result = dns_dsdigest_fromtext(&alg, &r);
        if (result != ISC_R_SUCCESS) {
-               cfg_obj_log(digest, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(digest, ISC_LOG_ERROR,
                            "dnssec-policy: bad cds digest-type %s", str);
                result = DNS_R_BADALG;
        } else if (!dst_ds_digest_supported(alg)) {
-               cfg_obj_log(digest, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(digest, ISC_LOG_ERROR,
                            "dnssec-policy: unsupported cds "
                            "digest-type %s",
                            str);
@@ -397,7 +395,7 @@ add_digest(dns_kasp_t *kasp, const cfg_obj_t *digest, isc_log_t *logctx) {
 
 isc_result_t
 cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
-                   bool check_algorithms, isc_mem_t *mctx, isc_log_t *logctx,
+                   bool check_algorithms, isc_mem_t *mctx,
                    dns_keystorelist_t *keystorelist, dns_kasplist_t *kasplist,
                    dns_kasp_t **kaspp) {
        isc_result_t result;
@@ -425,14 +423,14 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
        kaspname = cfg_obj_asstring(cfg_tuple_get(config, "name"));
        INSIST(kaspname != NULL);
 
-       cfg_obj_log(config, logctx, ISC_LOG_DEBUG(1),
-                   "dnssec-policy: load policy '%s'", kaspname);
+       cfg_obj_log(config, ISC_LOG_DEBUG(1), "dnssec-policy: load policy '%s'",
+                   kaspname);
 
        result = dns_kasplist_find(kasplist, kaspname, &kasp);
 
        if (result == ISC_R_SUCCESS) {
                cfg_obj_log(
-                       config, logctx, ISC_LOG_ERROR,
+                       config, ISC_LOG_ERROR,
                        "dnssec-policy: duplicately named policy found '%s'",
                        kaspname);
                dns_kasp_detach(&kasp);
@@ -472,7 +470,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
                                   DNS_KASP_SIG_VALIDITY_DNSKEY);
        if (sigrefresh >= (sigvalidity * 0.9)) {
                cfg_obj_log(
-                       config, logctx, ISC_LOG_ERROR,
+                       config, ISC_LOG_ERROR,
                        "dnssec-policy: policy '%s' signatures-refresh must be "
                        "at most 90%% of the signatures-validity-dnskey",
                        kaspname);
@@ -482,7 +480,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
 
        if (sigjitter > sigvalidity) {
                cfg_obj_log(
-                       config, logctx, ISC_LOG_ERROR,
+                       config, ISC_LOG_ERROR,
                        "dnssec-policy: policy '%s' signatures-jitter cannot "
                        "be larger than signatures-validity-dnskey",
                        kaspname);
@@ -493,7 +491,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
                                   DNS_KASP_SIG_VALIDITY);
        if (sigrefresh >= (sigvalidity * 0.9)) {
                cfg_obj_log(
-                       config, logctx, ISC_LOG_ERROR,
+                       config, ISC_LOG_ERROR,
                        "dnssec-policy: policy '%s' signatures-refresh must be "
                        "at most 90%% of the signatures-validity",
                        kaspname);
@@ -503,7 +501,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
 
        if (sigjitter > sigvalidity) {
                cfg_obj_log(
-                       config, logctx, ISC_LOG_ERROR,
+                       config, ISC_LOG_ERROR,
                        "dnssec-policy: policy '%s' signatures-jitter cannot "
                        "be larger than signatures-validity",
                        kaspname);
@@ -552,8 +550,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
                for (element = cfg_list_first(cds); element != NULL;
                     element = cfg_list_next(element))
                {
-                       result = add_digest(kasp, cfg_listelt_value(element),
-                                           logctx);
+                       result = add_digest(kasp, cfg_listelt_value(element));
                        if (result != ISC_R_SUCCESS) {
                                goto cleanup;
                        }
@@ -595,11 +592,10 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
                {
                        cfg_obj_t *kobj = cfg_listelt_value(element);
                        result = cfg_kaspkey_fromconfig(
-                               kobj, kasp, check_algorithms, logctx,
-                               keystorelist, ksk_min_lifetime,
-                               zsk_min_lifetime);
+                               kobj, kasp, check_algorithms, keystorelist,
+                               ksk_min_lifetime, zsk_min_lifetime);
                        if (result != ISC_R_SUCCESS) {
-                               cfg_obj_log(kobj, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(kobj, ISC_LOG_ERROR,
                                            "dnssec-policy: failed to "
                                            "configure keys (%s)",
                                            isc_result_totext(result));
@@ -637,20 +633,20 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
                        if (role[i] !=
                            (DNS_KASP_KEY_ROLE_ZSK | DNS_KASP_KEY_ROLE_KSK))
                        {
-                               cfg_obj_log(keys, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(keys, ISC_LOG_ERROR,
                                            "dnssec-policy: algorithm %zu "
                                            "requires both KSK and ZSK roles",
                                            i);
                                result = ISC_R_FAILURE;
                        }
                        if (warn[i][0]) {
-                               cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+                               cfg_obj_log(keys, ISC_LOG_WARNING,
                                            "dnssec-policy: algorithm %zu has "
                                            "multiple keys with ZSK role",
                                            i);
                        }
                        if (warn[i][1]) {
-                               cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+                               cfg_obj_log(keys, ISC_LOG_WARNING,
                                            "dnssec-policy: algorithm %zu has "
                                            "multiple keys with KSK role",
                                            i);
@@ -673,7 +669,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
                        new_key = NULL;
                        result = dns_kasp_key_create(kasp, &new_key);
                        if (result != ISC_R_SUCCESS) {
-                               cfg_obj_log(config, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(config, ISC_LOG_ERROR,
                                            "dnssec-policy: failed to "
                                            "configure keys (%s)",
                                            isc_result_totext(result));
@@ -692,7 +688,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
                                keystorelist, DNS_KEYSTORE_KEYDIRECTORY,
                                &new_key->keystore);
                        if (result != ISC_R_SUCCESS) {
-                               cfg_obj_log(config, logctx, ISC_LOG_ERROR,
+                               cfg_obj_log(config, ISC_LOG_ERROR,
                                            "dnssec-policy: failed to "
                                            "find keystore (%s)",
                                            isc_result_totext(result));
@@ -723,7 +719,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
                }
        } else {
                dns_kasp_setnsec3(kasp, true);
-               result = cfg_nsec3param_fromconfig(nsec3, kasp, logctx);
+               result = cfg_nsec3param_fromconfig(nsec3, kasp);
                if (result != ISC_R_SUCCESS) {
                        goto cleanup;
                }
@@ -748,7 +744,7 @@ cleanup:
 
 isc_result_t
 cfg_keystore_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
-                       isc_log_t *logctx, dns_keystorelist_t *keystorelist,
+                       dns_keystorelist_t *keystorelist,
                        dns_keystore_t **kspp) {
        isc_result_t result;
        const cfg_obj_t *maps[2];
@@ -768,13 +764,13 @@ cfg_keystore_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
        result = dns_keystorelist_find(keystorelist, name, &keystore);
 
        if (result == ISC_R_SUCCESS) {
-               cfg_obj_log(config, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(config, ISC_LOG_ERROR,
                            "key-store: duplicate key-store found '%s'", name);
                dns_keystore_detach(&keystore);
                return (ISC_R_EXISTS);
        }
        if (result != ISC_R_NOTFOUND) {
-               cfg_obj_log(config, logctx, ISC_LOG_ERROR,
+               cfg_obj_log(config, ISC_LOG_ERROR,
                            "key-store: lookup '%s' failed: %s", name,
                            isc_result_totext(result));
                return (result);
index 099331af2e13a7252c16f332232475ee1047f493..54ec3ad6b0fe55161475e018ad9fdfdd26e42c63 100644 (file)
@@ -30,7 +30,7 @@ isc_logcategory_t cfg_categories[] = { { "config", 0 }, { NULL, 0 } };
 isc_logmodule_t cfg_modules[] = { { "isccfg/parser", 0 }, { NULL, 0 } };
 
 void
-cfg_log_init(isc_log_t *lctx) {
-       isc_log_registercategories(lctx, cfg_categories);
-       isc_log_registermodules(lctx, cfg_modules);
+cfg_log_init(void) {
+       isc_log_registercategories(cfg_categories);
+       isc_log_registermodules(cfg_modules);
 }
index 708e6937c769f7c75863d562c7917c32b8ba1e71..3cd8308dece01f07a4320c9ab4cd3ad1e4ebc5ea 100644 (file)
@@ -498,7 +498,7 @@ static cfg_type_t cfg_type_filelist = { "filelist",    NULL,
                                        &cfg_rep_list, &cfg_type_qstring };
 
 isc_result_t
-cfg_parser_create(isc_mem_t *mctx, isc_log_t *lctx, cfg_parser_t **ret) {
+cfg_parser_create(isc_mem_t *mctx, cfg_parser_t **ret) {
        isc_result_t result;
        cfg_parser_t *pctx;
        isc_lexspecials_t specials;
@@ -513,7 +513,6 @@ cfg_parser_create(isc_mem_t *mctx, isc_log_t *lctx, cfg_parser_t **ret) {
 
        isc_refcount_init(&pctx->references, 1);
 
-       pctx->lctx = lctx;
        pctx->lexer = NULL;
        pctx->seen_eof = false;
        pctx->ungotten = false;
@@ -3694,20 +3693,19 @@ parser_complain(cfg_parser_t *pctx, bool is_warning, unsigned int flags,
        } else {
                tokenbuf[0] = '\0';
        }
-       isc_log_write(pctx->lctx, CAT, MOD, level, "%s%s%s%s", where, message,
-                     prep, tokenbuf);
+       isc_log_write(CAT, MOD, level, "%s%s%s%s", where, message, prep,
+                     tokenbuf);
 }
 
 void
-cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt,
-           ...) {
+cfg_obj_log(const cfg_obj_t *obj, int level, const char *fmt, ...) {
        va_list ap;
        char msgbuf[2048];
 
        REQUIRE(obj != NULL);
        REQUIRE(fmt != NULL);
 
-       if (!isc_log_wouldlog(lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -3716,10 +3714,10 @@ cfg_obj_log(const cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt,
        va_end(ap);
 
        if (obj->file != NULL) {
-               isc_log_write(lctx, CAT, MOD, level, "%s:%u: %s", obj->file,
+               isc_log_write(CAT, MOD, level, "%s:%u: %s", obj->file,
                              obj->line, msgbuf);
        } else {
-               isc_log_write(lctx, CAT, MOD, level, "%s", msgbuf);
+               isc_log_write(CAT, MOD, level, "%s", msgbuf);
        }
 }
 
@@ -3944,8 +3942,7 @@ cleanup:
 
 isc_result_t
 cfg_pluginlist_foreach(const cfg_obj_t *config, const cfg_obj_t *list,
-                      isc_log_t *lctx, pluginlist_cb_t *callback,
-                      void *callback_data) {
+                      pluginlist_cb_t *callback, void *callback_data) {
        isc_result_t result = ISC_R_SUCCESS;
        const cfg_listelt_t *element;
 
@@ -3966,7 +3963,7 @@ cfg_pluginlist_foreach(const cfg_obj_t *config, const cfg_obj_t *list,
 
                /* Only query plugins are supported currently. */
                if (strcasecmp(type, "query") != 0) {
-                       cfg_obj_log(obj, lctx, ISC_LOG_ERROR,
+                       cfg_obj_log(obj, ISC_LOG_ERROR,
                                    "unsupported plugin type");
                        return (ISC_R_FAILURE);
                }
index ba589e0464ed47a4fba39da79a015babb5582b4d..7bbe6fa7863c9e7860306f4883df38368265b29b 100644 (file)
@@ -960,7 +960,7 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
                } else {
                        loglevel = ISC_LOG_DEBUG(1);
                }
-               wouldlog = isc_log_wouldlog(ns_lctx, loglevel);
+               wouldlog = isc_log_wouldlog(loglevel);
                rrl_result = dns_rrl(client->view, NULL, &client->peeraddr,
                                     TCP_CLIENT(client), dns_rdataclass_in,
                                     dns_rdatatype_none, NULL, result,
@@ -2233,7 +2233,7 @@ ns_client_request_continue(void *arg) {
                                             client->view->proxyacl,
                                             false) != ISC_R_SUCCESS)
                {
-                       if (isc_log_wouldlog(ns_lctx, log_level)) {
+                       if (isc_log_wouldlog(log_level)) {
                                isc_sockaddr_format(&real_peer, fmtbuf,
                                                    sizeof(fmtbuf));
                                ns_client_log(
@@ -2254,7 +2254,7 @@ ns_client_request_continue(void *arg) {
                                             client->view->proxyonacl,
                                             true) != ISC_R_SUCCESS)
                {
-                       if (isc_log_wouldlog(ns_lctx, log_level)) {
+                       if (isc_log_wouldlog(log_level)) {
                                isc_sockaddr_format(&real_local, fmtbuf,
                                                    sizeof(fmtbuf));
                                ns_client_log(
@@ -2793,7 +2793,7 @@ ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
                snprintf(peerbuf, sizeof(peerbuf), "(no-peer)");
        }
 
-       isc_log_write(ns_lctx, category, module, level,
+       isc_log_write(category, module, level,
                      "client @%p %s%s%s%s%s%s%s%s: %s", client, peerbuf, sep1,
                      signer, sep2, qname, sep3, sep4, viewname, msgbuf);
 }
@@ -2803,7 +2803,7 @@ ns_client_log(ns_client_t *client, isc_logcategory_t *category,
              isc_logmodule_t *module, int level, const char *fmt, ...) {
        va_list ap;
 
-       if (!isc_log_wouldlog(ns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -2833,7 +2833,7 @@ ns_client_dumpmessage(ns_client_t *client, const char *reason) {
        int len = 1024;
        isc_result_t result;
 
-       if (!isc_log_wouldlog(ns_lctx, ISC_LOG_DEBUG(1))) {
+       if (!isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                return;
        }
 
index fe9d9cc2edefce42d524fddb4845dfcdf86f2da9..a14cda0071831065d0c0d983a9a6364ae3a2b7b4 100644 (file)
@@ -98,8 +98,8 @@ load_symbol(uv_lib_t *handle, const char *modpath, const char *symbol_name,
                if (errmsg == NULL) {
                        errmsg = "returned function pointer is NULL";
                }
-               isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL,
-                             NS_LOGMODULE_HOOKS, ISC_LOG_ERROR,
+               isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
+                             ISC_LOG_ERROR,
                              "failed to look up symbol %s in "
                              "plugin '%s': %s",
                              symbol_name, modpath, errmsg);
@@ -139,8 +139,8 @@ load_plugin(isc_mem_t *mctx, const char *modpath, ns_plugin_t **pluginp) {
                if (errmsg == NULL) {
                        errmsg = "unknown error";
                }
-               isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL,
-                             NS_LOGMODULE_HOOKS, ISC_LOG_ERROR,
+               isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
+                             ISC_LOG_ERROR,
                              "failed to dlopen() plugin '%s': %s", modpath,
                              errmsg);
                CHECK(ISC_R_FAILURE);
@@ -153,8 +153,8 @@ load_plugin(isc_mem_t *mctx, const char *modpath, ns_plugin_t **pluginp) {
        if (version < (NS_PLUGIN_VERSION - NS_PLUGIN_AGE) ||
            version > NS_PLUGIN_VERSION)
        {
-               isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL,
-                             NS_LOGMODULE_HOOKS, ISC_LOG_ERROR,
+               isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
+                             ISC_LOG_ERROR,
                              "plugin API version mismatch: %d/%d", version,
                              NS_PLUGIN_VERSION);
                CHECK(ISC_R_FAILURE);
@@ -172,8 +172,7 @@ load_plugin(isc_mem_t *mctx, const char *modpath, ns_plugin_t **pluginp) {
        return (ISC_R_SUCCESS);
 
 cleanup:
-       isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
-                     ISC_LOG_ERROR,
+       isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, ISC_LOG_ERROR,
                      "failed to dynamically load plugin '%s': %s", modpath,
                      isc_result_totext(result));
 
@@ -191,7 +190,7 @@ unload_plugin(ns_plugin_t **pluginp) {
        plugin = *pluginp;
        *pluginp = NULL;
 
-       isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
+       isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
                      ISC_LOG_DEBUG(1), "unloading plugin '%s'",
                      plugin->modpath);
 
@@ -207,26 +206,23 @@ unload_plugin(ns_plugin_t **pluginp) {
 isc_result_t
 ns_plugin_register(const char *modpath, const char *parameters, const void *cfg,
                   const char *cfg_file, unsigned long cfg_line,
-                  isc_mem_t *mctx, isc_log_t *lctx, void *actx,
-                  dns_view_t *view) {
+                  isc_mem_t *mctx, void *actx, dns_view_t *view) {
        isc_result_t result;
        ns_plugin_t *plugin = NULL;
 
        REQUIRE(mctx != NULL);
-       REQUIRE(lctx != NULL);
        REQUIRE(view != NULL);
 
-       isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
-                     ISC_LOG_INFO, "loading plugin '%s'", modpath);
+       isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
+                     "loading plugin '%s'", modpath);
 
        CHECK(load_plugin(mctx, modpath, &plugin));
 
-       isc_log_write(ns_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS,
-                     ISC_LOG_INFO, "registering plugin '%s'", modpath);
+       isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
+                     "registering plugin '%s'", modpath);
 
        CHECK(plugin->register_func(parameters, cfg, cfg_file, cfg_line, mctx,
-                                   lctx, actx, view->hooktable,
-                                   &plugin->inst));
+                                   actx, view->hooktable, &plugin->inst));
 
        ISC_LIST_APPEND(*(ns_plugins_t *)view->plugins, plugin, link);
 
@@ -241,14 +237,14 @@ cleanup:
 isc_result_t
 ns_plugin_check(const char *modpath, const char *parameters, const void *cfg,
                const char *cfg_file, unsigned long cfg_line, isc_mem_t *mctx,
-               isc_log_t *lctx, void *actx) {
+               void *actx) {
        isc_result_t result;
        ns_plugin_t *plugin = NULL;
 
        CHECK(load_plugin(mctx, modpath, &plugin));
 
        result = plugin->check_func(parameters, cfg, cfg_file, cfg_line, mctx,
-                                   lctx, actx);
+                                   actx);
 
 cleanup:
        if (plugin != NULL) {
index 3d34a962e0de089a415772e0b4a57ddc0ab1f8a7..e5bf4176b9575c77b8552d1aea00285e2e4eb795 100644 (file)
@@ -462,8 +462,8 @@ typedef struct ns_hook_resume {
 
 typedef isc_result_t
 ns_plugin_register_t(const char *parameters, const void *cfg, const char *file,
-                    unsigned long line, isc_mem_t *mctx, isc_log_t *lctx,
-                    void *actx, ns_hooktable_t *hooktable, void **instp);
+                    unsigned long line, isc_mem_t *mctx, void *actx,
+                    ns_hooktable_t *hooktable, void **instp);
 /*%<
  * Called when registering a new plugin.
  *
@@ -488,8 +488,7 @@ ns_plugin_destroy_t(void **instp);
 
 typedef isc_result_t
 ns_plugin_check_t(const char *parameters, const void *cfg, const char *file,
-                 unsigned long line, isc_mem_t *mctx, isc_log_t *lctx,
-                 void *actx);
+                 unsigned long line, isc_mem_t *mctx, void *actx);
 /*%<
  * Check the validity of 'parameters'.
  */
@@ -537,8 +536,7 @@ ns_plugin_expandpath(const char *src, char *dst, size_t dstsize);
 isc_result_t
 ns_plugin_register(const char *modpath, const char *parameters, const void *cfg,
                   const char *cfg_file, unsigned long cfg_line,
-                  isc_mem_t *mctx, isc_log_t *lctx, void *actx,
-                  dns_view_t *view);
+                  isc_mem_t *mctx, void *actx, dns_view_t *view);
 /*%<
  * Load the plugin module specified from the file 'modpath', and
  * register an instance using 'parameters'.
@@ -557,7 +555,7 @@ ns_plugin_register(const char *modpath, const char *parameters, const void *cfg,
 isc_result_t
 ns_plugin_check(const char *modpath, const char *parameters, const void *cfg,
                const char *cfg_file, unsigned long cfg_line, isc_mem_t *mctx,
-               isc_log_t *lctx, void *actx);
+               void *actx);
 /*%<
  * Open the plugin module at 'modpath' and check the validity of
  * 'parameters', logging any errors or warnings found, then
index ba21175dfcc38650e00d4440fd64b5d8668dae57..884a0458c9bf205dd74f0bee379394155655b6d8 100644 (file)
@@ -18,7 +18,6 @@
 #include <isc/log.h>
 #include <isc/types.h>
 
-extern isc_log_t       *ns_lctx;
 extern isc_logcategory_t ns_categories[];
 extern isc_logmodule_t  ns_modules[];
 
@@ -46,7 +45,7 @@ extern isc_logmodule_t         ns_modules[];
 #define NS_LOGMODULE_HOOKS       (&ns_modules[7])
 
 void
-ns_log_init(isc_log_t *lctx);
+ns_log_init(void);
 /*%<
  * Make the libns categories and modules available for use with the
  * ISC logging library.
index fc0613452407400fcaa4b6129fc59aabc3f6e105..9c952ee928a85014f0b28c17d91e99556121785c 100644 (file)
@@ -58,9 +58,6 @@
 #define IFMGR_MAGIC             ISC_MAGIC('I', 'F', 'M', 'G')
 #define NS_INTERFACEMGR_VALID(t) ISC_MAGIC_VALID(t, IFMGR_MAGIC)
 
-#define IFMGR_COMMON_LOGARGS \
-       ns_lctx, NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR
-
 /*% nameserver interface manager structure */
 struct ns_interfacemgr {
        unsigned int magic; /*%< Magic number */
@@ -203,7 +200,8 @@ route_recv(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
        struct MSGHDR *rtm = NULL;
        size_t rtmlen;
 
-       isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_DEBUG(9), "route_recv: %s",
+       isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                     ISC_LOG_DEBUG(9), "route_recv: %s",
                      isc_result_totext(eresult));
 
        if (handle == NULL) {
@@ -214,7 +212,8 @@ route_recv(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
        case ISC_R_SUCCESS:
                break;
        default:
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR,
                              "automatic interface scanning terminated: %s",
                              isc_result_totext(eresult));
                FALLTHROUGH;
@@ -230,7 +229,8 @@ route_recv(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
 
 #ifdef RTM_VERSION
        if (rtm->rtm_version != RTM_VERSION) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR,
                              "automatic interface rescanning disabled: "
                              "rtm->rtm_version mismatch (%u != %u) "
                              "recompile required",
@@ -255,8 +255,9 @@ static void
 route_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
        ns_interfacemgr_t *mgr = (ns_interfacemgr_t *)arg;
 
-       isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_DEBUG(9),
-                     "route_connected: %s", isc_result_totext(eresult));
+       isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                     ISC_LOG_DEBUG(9), "route_connected: %s",
+                     isc_result_totext(eresult));
 
        if (eresult != ISC_R_SUCCESS) {
                ns_interfacemgr_detach(&mgr);
@@ -352,8 +353,8 @@ ns_interfacemgr_routeconnect(ns_interfacemgr_t *mgr) {
        isc_result_t result = isc_nm_routeconnect(mgr->nm, route_connected,
                                                  mgr);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_INFO,
-                             "unable to open route socket: %s",
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_INFO, "unable to open route socket: %s",
                              isc_result_totext(result));
                ns_interfacemgr_unref(mgr);
        }
@@ -505,8 +506,8 @@ ns_interface_listentcp(ns_interface_t *ifp, isc_nm_proxy_type_t proxy) {
                ifp, ns__client_tcpconn, ifp, ifp->mgr->backlog,
                &ifp->mgr->sctx->tcpquota, NULL, proxy, &ifp->tcplistensocket);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "creating TCP socket: %s",
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR, "creating TCP socket: %s",
                              isc_result_totext(result));
        }
 
@@ -517,8 +518,8 @@ ns_interface_listentcp(ns_interface_t *ifp, isc_nm_proxy_type_t proxy) {
         */
        result = ns__client_tcpconn(NULL, ISC_R_SUCCESS, ifp);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "connecting TCP socket: %s",
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR, "connecting TCP socket: %s",
                              isc_result_totext(result));
        }
 
@@ -541,8 +542,8 @@ ns_interface_listentls(ns_interface_t *ifp, isc_nm_proxy_type_t proxy,
                &ifp->tlslistensocket);
 
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "creating TLS socket: %s",
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR, "creating TLS socket: %s",
                              isc_result_totext(result));
                return (result);
        }
@@ -554,8 +555,8 @@ ns_interface_listentls(ns_interface_t *ifp, isc_nm_proxy_type_t proxy,
         */
        result = ns__client_tcpconn(NULL, ISC_R_SUCCESS, ifp);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "updating TCP stats: %s",
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR, "updating TCP stats: %s",
                              isc_result_totext(result));
        }
 
@@ -616,8 +617,8 @@ ns_interface_listenhttp(ns_interface_t *ifp, isc_nm_proxy_type_t proxy,
        }
 
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "creating %s socket: %s",
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR, "creating %s socket: %s",
                              sslctx ? "HTTPS" : "HTTP",
                              isc_result_totext(result));
                return (result);
@@ -636,8 +637,8 @@ ns_interface_listenhttp(ns_interface_t *ifp, isc_nm_proxy_type_t proxy,
         */
        result = ns__client_tcpconn(NULL, ISC_R_SUCCESS, ifp);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "updating TCP stats: %s",
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR, "updating TCP stats: %s",
                              isc_result_totext(result));
        }
 
@@ -808,8 +809,8 @@ static void
 log_interface_shutdown(const ns_interface_t *ifp) {
        char sabuf[ISC_SOCKADDR_FORMATSIZE];
        isc_sockaddr_format(&ifp->addr, sabuf, sizeof(sabuf));
-       isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_INFO,
-                     "no longer listening on %s", sabuf);
+       isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                     ISC_LOG_INFO, "no longer listening on %s", sabuf);
 }
 
 /*%
@@ -876,7 +877,8 @@ setup_locals(isc_interface_t *interface, dns_acl_t *localhost,
        }
 
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_WARNING,
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_WARNING,
                              "omitting IPv4 interface %s from "
                              "localnets ACL: %s",
                              interface->name, isc_result_totext(result));
@@ -884,7 +886,8 @@ setup_locals(isc_interface_t *interface, dns_acl_t *localhost,
        }
 
        if (prefixlen == 0U) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_WARNING,
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_WARNING,
                              "omitting %s interface %s from localnets ACL: "
                              "zero prefix length detected",
                              (netaddr->family == AF_INET) ? "IPv4" : "IPv6",
@@ -951,8 +954,8 @@ replace_listener_tlsctx(ns_interface_t *ifp, isc_tlsctx_t *newctx) {
        char sabuf[ISC_SOCKADDR_FORMATSIZE];
 
        isc_sockaddr_format(&ifp->addr, sabuf, sizeof(sabuf));
-       isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_INFO,
-                     "updating TLS context on %s", sabuf);
+       isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                     ISC_LOG_INFO, "updating TLS context on %s", sabuf);
        if (ifp->tlslistensocket != NULL) {
                isc_nmsocket_set_tlsctx(ifp->tlslistensocket, newctx);
        } else if (ifp->http_secure_listensocket != NULL) {
@@ -1100,7 +1103,7 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
        if (isc_net_probeipv6() == ISC_R_SUCCESS) {
                scan_ipv6 = true;
        } else if ((mgr->sctx->options & NS_SERVER_DISABLE6) == 0) {
-               isc_log_write(IFMGR_COMMON_LOGARGS,
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
                              verbose ? ISC_LOG_INFO : ISC_LOG_DEBUG(1),
                              "no IPv6 interfaces found");
        }
@@ -1108,7 +1111,7 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
        if (isc_net_probeipv4() == ISC_R_SUCCESS) {
                scan_ipv4 = true;
        } else if ((mgr->sctx->options & NS_SERVER_DISABLE4) == 0) {
-               isc_log_write(IFMGR_COMMON_LOGARGS,
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
                              verbose ? ISC_LOG_INFO : ISC_LOG_DEBUG(1),
                              "no IPv4 interfaces found");
        }
@@ -1151,7 +1154,8 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
                                }
                        }
 
-                       isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_INFO,
+                       isc_log_write(NS_LOGCATEGORY_NETWORK,
+                                     NS_LOGMODULE_INTERFACEMGR, ISC_LOG_INFO,
                                      "listening on IPv6 "
                                      "interfaces, port %u",
                                      le->port);
@@ -1160,7 +1164,8 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
                        if (result == ISC_R_SUCCESS) {
                                ifp->flags |= NS_INTERFACEFLAG_ANYADDR;
                        } else {
-                               isc_log_write(IFMGR_COMMON_LOGARGS,
+                               isc_log_write(NS_LOGCATEGORY_NETWORK,
+                                             NS_LOGMODULE_INTERFACEMGR,
                                              ISC_LOG_ERROR,
                                              "listening on all IPv6 "
                                              "interfaces failed");
@@ -1300,7 +1305,8 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
                        if (log_explicit && family == AF_INET6 &&
                            listenon_is_ip6_any(le))
                        {
-                               isc_log_write(IFMGR_COMMON_LOGARGS,
+                               isc_log_write(NS_LOGCATEGORY_NETWORK,
+                                             NS_LOGMODULE_INTERFACEMGR,
                                              verbose ? ISC_LOG_INFO
                                                      : ISC_LOG_DEBUG(1),
                                              "IPv6 socket API is "
@@ -1311,7 +1317,8 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
                        }
                        isc_sockaddr_format(&listen_sockaddr, sabuf,
                                            sizeof(sabuf));
-                       isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_INFO,
+                       isc_log_write(NS_LOGCATEGORY_NETWORK,
+                                     NS_LOGMODULE_INTERFACEMGR, ISC_LOG_INFO,
                                      "listening on %s interface "
                                      "%s, %s",
                                      (family == AF_INET) ? "IPv4" : "IPv6",
@@ -1327,20 +1334,22 @@ do_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
                        }
 
                        if (result != ISC_R_SUCCESS) {
-                               isc_log_write(
-                                       IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
-                                       "creating %s interface "
-                                       "%s failed; interface ignored",
-                                       (family == AF_INET) ? "IPv4" : "IPv6",
-                                       interface.name);
+                               isc_log_write(NS_LOGCATEGORY_NETWORK,
+                                             NS_LOGMODULE_INTERFACEMGR,
+                                             ISC_LOG_ERROR,
+                                             "creating %s interface "
+                                             "%s failed; interface ignored",
+                                             (family == AF_INET) ? "IPv4"
+                                                                 : "IPv6",
+                                             interface.name);
                        }
                        /* Continue. */
                }
                continue;
 
        ignore_interface:
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
-                             "ignoring %s interface %s: %s",
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_ERROR, "ignoring %s interface %s: %s",
                              (family == AF_INET) ? "IPv4" : "IPv6",
                              interface.name, isc_result_totext(result));
                continue;
@@ -1392,7 +1401,8 @@ ns_interfacemgr_scan(ns_interfacemgr_t *mgr, bool verbose, bool config) {
         * Warn if we are not listening on any interface.
         */
        if (ISC_LIST_EMPTY(mgr->interfaces)) {
-               isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_WARNING,
+               isc_log_write(NS_LOGCATEGORY_NETWORK, NS_LOGMODULE_INTERFACEMGR,
+                             ISC_LOG_WARNING,
                              "not listening on any interfaces");
        }
 
index cfac466540acb0084c2f2429d279fba4f7376874..acaaece2d19f7df94a3cd116cd34cefac1bb9606 100644 (file)
@@ -118,8 +118,7 @@ listenelt_create(isc_mem_t *mctx, in_port_t port, dns_acl_t *acl,
                                if (!isc_tlsctx_load_dhparams(
                                            sslctx, tls_params->dhparam_file))
                                {
-                                       isc_log_write(ns_lctx,
-                                                     NS_LOGCATEGORY_GENERAL,
+                                       isc_log_write(NS_LOGCATEGORY_GENERAL,
                                                      NS_LOGMODULE_INTERFACEMGR,
                                                      ISC_LOG_ERROR,
                                                      "loading of dhparam-file "
index 0adf034241b94c85cbe6a40d5d03919eb1727d91..6083085f2fa99ffd66875cd3a488213a2650ab78 100644 (file)
@@ -46,10 +46,8 @@ isc_logmodule_t ns_modules[] = {
        { "ns/notify", 0 }, { "ns/hooks", 0 },   { NULL, 0 }
 };
 
-isc_log_t *ns_lctx = NULL;
-
 void
-ns_log_init(isc_log_t *lctx) {
-       isc_log_registercategories(lctx, ns_categories);
-       isc_log_registermodules(lctx, ns_modules);
+ns_log_init(void) {
+       isc_log_registercategories(ns_categories);
+       isc_log_registermodules(ns_modules);
 }
index 75a87ca2119fa5df416edbe8f11fe0b5746197da..dfd7cc60fc653015e4802c34c86512f2c7683c34 100644 (file)
 static void
 client_trace(ns_client_t *client, int level, const char *message) {
        if (client != NULL && client->query.qname != NULL) {
-               if (isc_log_wouldlog(ns_lctx, level)) {
+               if (isc_log_wouldlog(level)) {
                        char qbuf[DNS_NAME_FORMATSIZE];
                        char tbuf[DNS_RDATATYPE_FORMATSIZE];
                        dns_name_format(client->query.qname, qbuf,
                                        sizeof(qbuf));
                        dns_rdatatype_format(client->query.qtype, tbuf,
                                             sizeof(tbuf));
-                       isc_log_write(ns_lctx, NS_LOGCATEGORY_CLIENT,
-                                     NS_LOGMODULE_QUERY, level,
+                       isc_log_write(NS_LOGCATEGORY_CLIENT, NS_LOGMODULE_QUERY,
+                                     level,
                                      "query client=%p thread=0x%" PRIxPTR
                                      "(%s/%s): %s",
                                      client, isc_thread_self(), qbuf, tbuf,
                                      message);
                }
        } else {
-               isc_log_write(ns_lctx, NS_LOGCATEGORY_CLIENT,
-                             NS_LOGMODULE_QUERY, level,
+               isc_log_write(NS_LOGCATEGORY_CLIENT, NS_LOGMODULE_QUERY, level,
                              "query client=%p thread=0x%" PRIxPTR
                              "(<unknown-query>): %s",
                              client, isc_thread_self(), message);
@@ -866,7 +865,7 @@ query_checkcacheaccess(ns_client_t *client, const dns_name_t *name,
                         */
                        client->query.attributes |= NS_QUERYATTR_CACHEACLOK;
                        if (!options.nolog &&
-                           isc_log_wouldlog(ns_lctx, ISC_LOG_DEBUG(3)))
+                           isc_log_wouldlog(ISC_LOG_DEBUG(3)))
                        {
                                ns_client_aclmsg("query (cache)", name, qtype,
                                                 client->view->rdclass, msg,
@@ -1007,7 +1006,7 @@ query_validatezonedb(ns_client_t *client, const dns_name_t *name,
        if (!options.nolog) {
                char msg[NS_CLIENT_ACLMSGSIZE("query")];
                if (result == ISC_R_SUCCESS) {
-                       if (isc_log_wouldlog(ns_lctx, ISC_LOG_DEBUG(3))) {
+                       if (isc_log_wouldlog(ISC_LOG_DEBUG(3))) {
                                ns_client_aclmsg("query", name, qtype,
                                                 client->view->rdclass, msg,
                                                 sizeof(msg));
@@ -1169,7 +1168,7 @@ rpz_log_rewrite(ns_client_t *client, bool disabled, dns_rpz_policy_t policy,
                }
        }
 
-       if (!isc_log_wouldlog(ns_lctx, DNS_RPZ_INFO_LEVEL)) {
+       if (!isc_log_wouldlog(DNS_RPZ_INFO_LEVEL)) {
                return;
        }
 
@@ -1217,7 +1216,7 @@ rpz_log_fail_helper(ns_client_t *client, int level, dns_name_t *p_name,
        const char *rpztypestr1;
        const char *rpztypestr2;
 
-       if (!isc_log_wouldlog(ns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -1288,7 +1287,7 @@ rpz_getdb(ns_client_t *client, dns_name_t *p_name, dns_rpz_type_t rpz_type,
                 * logging is disabled for some policy zones.
                 */
                if (st->popt.no_log == 0 &&
-                   isc_log_wouldlog(ns_lctx, DNS_RPZ_DEBUG_LEVEL2))
+                   isc_log_wouldlog(DNS_RPZ_DEBUG_LEVEL2))
                {
                        dns_name_format(client->query.qname, qnamebuf,
                                        sizeof(qnamebuf));
@@ -6041,8 +6040,8 @@ query_lookup(query_ctx_t *qctx) {
        }
 
        if (dbfind_stale) {
-               isc_log_write(ns_lctx, NS_LOGCATEGORY_SERVE_STALE,
-                             NS_LOGMODULE_QUERY, ISC_LOG_INFO,
+               isc_log_write(NS_LOGCATEGORY_SERVE_STALE, NS_LOGMODULE_QUERY,
+                             ISC_LOG_INFO,
                              "%s %s resolver failure, stale answer %s (%s)",
                              namebuf, typebuf,
                              stale_found ? "used" : "unavailable",
@@ -6063,8 +6062,8 @@ query_lookup(query_ctx_t *qctx) {
                 * A recent lookup failed, so during this time window we are
                 * allowed to return stale data immediately.
                 */
-               isc_log_write(ns_lctx, NS_LOGCATEGORY_SERVE_STALE,
-                             NS_LOGMODULE_QUERY, ISC_LOG_INFO,
+               isc_log_write(NS_LOGCATEGORY_SERVE_STALE, NS_LOGMODULE_QUERY,
+                             ISC_LOG_INFO,
                              "%s %s query within stale refresh time, stale "
                              "answer %s (%s)",
                              namebuf, typebuf,
@@ -6110,7 +6109,7 @@ query_lookup(query_ctx_t *qctx) {
                                 * resolver fetch to refresh the data in cache.
                                 */
                                isc_log_write(
-                                       ns_lctx, NS_LOGCATEGORY_SERVE_STALE,
+                                       NS_LOGCATEGORY_SERVE_STALE,
                                        NS_LOGMODULE_QUERY, ISC_LOG_INFO,
                                        "%s %s stale answer used, an attempt "
                                        "to refresh the RRset will still be "
@@ -6316,9 +6315,8 @@ fetch_callback(void *arg) {
                        } else {
                                errorloglevel = ISC_LOG_DEBUG(4);
                        }
-                       if (isc_log_wouldlog(ns_lctx, errorloglevel)) {
-                               dns_resolver_logfetch(fetch, ns_lctx,
-                                                     logcategory,
+                       if (isc_log_wouldlog(errorloglevel)) {
+                               dns_resolver_logfetch(fetch, logcategory,
                                                      NS_LOGMODULE_QUERY,
                                                      errorloglevel, false);
                        }
@@ -6940,7 +6938,7 @@ ns__query_sfcache(query_ctx_t *qctx) {
        if (((flags & NS_FAILCACHE_CD) != 0) ||
            ((qctx->client->message->flags & DNS_MESSAGEFLAG_CD) == 0))
        {
-               if (isc_log_wouldlog(ns_lctx, ISC_LOG_DEBUG(1))) {
+               if (isc_log_wouldlog(ISC_LOG_DEBUG(1))) {
                        char namebuf[DNS_NAME_FORMATSIZE];
                        char typebuf[DNS_RDATATYPE_FORMATSIZE];
 
@@ -7042,7 +7040,7 @@ query_checkrrl(query_ctx_t *qctx, isc_result_t result) {
 
                qctx->client->query.attributes |= NS_QUERYATTR_RRL_CHECKED;
 
-               wouldlog = isc_log_wouldlog(ns_lctx, DNS_RRL_LOG_DROP);
+               wouldlog = isc_log_wouldlog(DNS_RRL_LOG_DROP);
                constname = qctx->fname;
                if (result == DNS_R_NXDOMAIN) {
                        /*
@@ -11720,7 +11718,7 @@ log_tat(ns_client_t *client) {
        char *tags = NULL;
        size_t taglen = 0;
 
-       if (!isc_log_wouldlog(ns_lctx, ISC_LOG_INFO)) {
+       if (!isc_log_wouldlog(ISC_LOG_INFO)) {
                return;
        }
 
@@ -11763,9 +11761,9 @@ log_tat(ns_client_t *client) {
                }
        }
 
-       isc_log_write(ns_lctx, NS_LOGCATEGORY_TAT, NS_LOGMODULE_QUERY,
-                     ISC_LOG_INFO, "trust-anchor-telemetry '%s/%s' from %s%s",
-                     namebuf, classbuf, clientbuf, tags != NULL ? tags : "");
+       isc_log_write(NS_LOGCATEGORY_TAT, NS_LOGMODULE_QUERY, ISC_LOG_INFO,
+                     "trust-anchor-telemetry '%s/%s' from %s%s", namebuf,
+                     classbuf, clientbuf, tags != NULL ? tags : "");
        if (tags != NULL) {
                isc_mem_put(client->manager->mctx, tags, taglen);
        }
@@ -11782,7 +11780,7 @@ log_query(ns_client_t *client, unsigned int flags, unsigned int extflags) {
        dns_rdataset_t *rdataset;
        int level = ISC_LOG_INFO;
 
-       if (!isc_log_wouldlog(ns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -11825,7 +11823,7 @@ log_queryerror(ns_client_t *client, isc_result_t result, int line, int level) {
        const char *namep, *typep, *classp, *sep1, *sep2;
        dns_rdataset_t *rdataset;
 
-       if (!isc_log_wouldlog(ns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
index 1dc6cadd7a8c8a5acb79f5359e9195c9fc3e1e33..ceeecbbf4dbd844c8d13af823e0fae862fca587a 100644 (file)
                default:                                                   \
                        break;                                             \
                }                                                          \
-               if (isc_log_wouldlog(ns_lctx, LOGLEVEL_PROTOCOL)) {        \
+               if (isc_log_wouldlog(LOGLEVEL_PROTOCOL)) {                 \
                        char _nbuf[DNS_NAME_FORMATSIZE];                   \
                        dns_name_format(name, _nbuf, sizeof(_nbuf));       \
                        update_log(client, zone, LOGLEVEL_PROTOCOL,        \
                default:                                                      \
                        break;                                                \
                }                                                             \
-               if (isc_log_wouldlog(ns_lctx, LOGLEVEL_PROTOCOL)) {           \
+               if (isc_log_wouldlog(LOGLEVEL_PROTOCOL)) {                    \
                        char _nbuf[DNS_NAME_FORMATSIZE];                      \
                        char _tbuf[DNS_RDATATYPE_FORMATSIZE];                 \
                        dns_name_format(name, _nbuf, sizeof(_nbuf));          \
@@ -292,7 +292,7 @@ update_log(ns_client_t *client, dns_zone_t *zone, int level, const char *fmt,
                return;
        }
 
-       if (!isc_log_wouldlog(ns_lctx, level)) {
+       if (!isc_log_wouldlog(level)) {
                return;
        }
 
@@ -1915,8 +1915,8 @@ respond(ns_client_t *client, isc_result_t result) {
 
        msg_result = dns_message_reply(client->message, true);
        if (msg_result != ISC_R_SUCCESS) {
-               isc_log_write(ns_lctx, NS_LOGCATEGORY_UPDATE,
-                             NS_LOGMODULE_UPDATE, ISC_LOG_ERROR,
+               isc_log_write(NS_LOGCATEGORY_UPDATE, NS_LOGMODULE_UPDATE,
+                             ISC_LOG_ERROR,
                              "could not create update response message: %s",
                              isc_result_totext(msg_result));
                ns_client_drop(client, msg_result);
@@ -3077,7 +3077,7 @@ update_action(void *arg) {
                                }
                        }
 
-                       if (isc_log_wouldlog(ns_lctx, LOGLEVEL_PROTOCOL)) {
+                       if (isc_log_wouldlog(LOGLEVEL_PROTOCOL)) {
                                char namestr[DNS_NAME_FORMATSIZE];
                                char typestr[DNS_RDATATYPE_FORMATSIZE];
                                char rdstr[2048];
@@ -3157,9 +3157,7 @@ update_action(void *arg) {
                        }
                } else if (update_class == dns_rdataclass_any) {
                        if (rdata.type == dns_rdatatype_any) {
-                               if (isc_log_wouldlog(ns_lctx,
-                                                    LOGLEVEL_PROTOCOL))
-                               {
+                               if (isc_log_wouldlog(LOGLEVEL_PROTOCOL)) {
                                        char namestr[DNS_NAME_FORMATSIZE];
                                        dns_name_format(name, namestr,
                                                        sizeof(namestr));
@@ -3189,9 +3187,7 @@ update_action(void *arg) {
                                           "or NS records ignored");
                                continue;
                        } else {
-                               if (isc_log_wouldlog(ns_lctx,
-                                                    LOGLEVEL_PROTOCOL))
-                               {
+                               if (isc_log_wouldlog(LOGLEVEL_PROTOCOL)) {
                                        char namestr[DNS_NAME_FORMATSIZE];
                                        char typestr[DNS_RDATATYPE_FORMATSIZE];
                                        dns_name_format(name, namestr,
index 31db2f043c927930863985d643483948e1848ae2..85c04d8863a9f8f02caf053e2dde009111920201 100644 (file)
  *  - IXFR over UDP
  */
 
-#define XFROUT_COMMON_LOGARGS \
-       ns_lctx, DNS_LOGCATEGORY_XFER_OUT, NS_LOGMODULE_XFER_OUT
+#define XFROUT_PROTOCOL_LOGARGS \
+       DNS_LOGCATEGORY_XFER_OUT, NS_LOGMODULE_XFER_OUT, ISC_LOG_INFO
 
-#define XFROUT_PROTOCOL_LOGARGS XFROUT_COMMON_LOGARGS, ISC_LOG_INFO
+#define XFROUT_DEBUG_LOGARGS(n) \
+       DNS_LOGCATEGORY_XFER_OUT, NS_LOGMODULE_XFER_OUT, ISC_LOG_DEBUG(n)
 
-#define XFROUT_DEBUG_LOGARGS(n) XFROUT_COMMON_LOGARGS, ISC_LOG_DEBUG(n)
-
-#define XFROUT_RR_LOGARGS XFROUT_COMMON_LOGARGS, XFROUT_RR_LOGLEVEL
+#define XFROUT_RR_LOGARGS \
+       DNS_LOGCATEGORY_XFER_OUT, NS_LOGMODULE_XFER_OUT, XFROUT_RR_LOGLEVEL
 
 #define XFROUT_RR_LOGLEVEL ISC_LOG_DEBUG(8)
 
@@ -772,9 +772,9 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
         */
        result = isc_quota_acquire(&client->manager->sctx->xfroutquota);
        if (result != ISC_R_SUCCESS) {
-               isc_log_write(XFROUT_COMMON_LOGARGS, ISC_LOG_WARNING,
-                             "%s request denied: %s", mnemonic,
-                             isc_result_totext(result));
+               isc_log_write(DNS_LOGCATEGORY_XFER_OUT, NS_LOGMODULE_XFER_OUT,
+                             ISC_LOG_WARNING, "%s request denied: %s",
+                             mnemonic, isc_result_totext(result));
                goto max_quota;
        }
 
@@ -1528,7 +1528,7 @@ sendstream(xfrout_ctx_t *xfr) {
                        break;
                }
 
-               if (isc_log_wouldlog(ns_lctx, XFROUT_RR_LOGLEVEL)) {
+               if (isc_log_wouldlog(XFROUT_RR_LOGLEVEL)) {
                        log_rr(name, rdata, ttl); /* XXX */
                }
 
index 2a7451d90c78795f9107d1646572da9ea1bab2cd..6713ecf4c53de46bdbb151004f9177acf8b3573a 100644 (file)
@@ -54,9 +54,9 @@
 #define ZIPF   0
 
 #if VERBOSE
-#define TRACE(fmt, ...)                                                     \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_QP, \
-                     ISC_LOG_DEBUG(7), "%s:%d:%s():t%d: " fmt, __FILE__,   \
+#define TRACE(fmt, ...)                                                   \
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_QP,         \
+                     ISC_LOG_DEBUG(7), "%s:%d:%s():t%d: " fmt, __FILE__, \
                      __LINE__, __func__, isc_tid(), ##__VA_ARGS__)
 #else
 #define TRACE(...)
@@ -157,11 +157,10 @@ init_logging(void) {
        isc_result_t result;
        isc_logdestination_t destination;
        isc_logconfig_t *logconfig = NULL;
-       isc_log_t *lctx = NULL;
 
-       dns_log_init(lctx);
+       dns_log_init();
 
-       logconfig = isc_logconfig_get(lctx);
+       logconfig = isc_logconfig_get();
        destination.file.stream = stderr;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
@@ -171,7 +170,7 @@ init_logging(void) {
                              ISC_LOG_PRINTPREFIX | ISC_LOG_PRINTTIME |
                                      ISC_LOG_ISO8601);
 #if VERBOSE
-       isc_log_setdebuglevel(lctx, 7);
+       isc_log_setdebuglevel(7);
 #endif
 
        result = isc_log_usechannel(logconfig, "stderr",
index b6603dddc08e2a41720e04084548ccd37e283d22..1718e86825bf82c4fd7e022c4926b9cdb25f38d0 100644 (file)
@@ -48,9 +48,9 @@
 #define TRANSACTION_COUNT 1234
 
 #if VERBOSE
-#define TRACE(fmt, ...)                                                     \
-       isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_QP, \
-                     ISC_LOG_DEBUG(7), "%s:%d:%s(): " fmt, __FILE__,       \
+#define TRACE(fmt, ...)                                               \
+       isc_log_write(DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_QP,     \
+                     ISC_LOG_DEBUG(7), "%s:%d:%s(): " fmt, __FILE__, \
                      __LINE__, __func__, ##__VA_ARGS__)
 #else
 #define TRACE(...)
@@ -72,9 +72,9 @@ setup_logging(void) {
        isc_logdestination_t destination;
        isc_logconfig_t *logconfig = NULL;
 
-       dns_log_init(lctx);
+       dns_log_init();
 
-       logconfig = isc_logconfig_get(lctx);
+       logconfig = isc_logconfig_get();
        destination.file.stream = stderr;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
@@ -85,7 +85,7 @@ setup_logging(void) {
                                      ISC_LOG_ISO8601);
 
 #if VERBOSE
-       isc_log_setdebuglevel(lctx, 7);
+       isc_log_setdebuglevel(7);
 #endif
 
        result = isc_log_usechannel(logconfig, "stderr",
index 125b88009e046f296658acb5927e5f4ff439a512..bb4164d8bb1b7ad53825c9b722a0f657c3dd5e3b 100644 (file)
@@ -30,7 +30,6 @@
 #include <isc/uv.h>
 
 extern isc_mem_t     *mctx;
-extern isc_log_t     *lctx;
 extern isc_loop_t    *mainloop;
 extern isc_loopmgr_t *loopmgr;
 extern isc_nm_t             *netmgr;
index d093e70e3c0904fe8c6dbc68ffa8445392659c62..ca4193760b06aa0d18ae06f6fc96d694f6c27f1f 100644 (file)
@@ -52,9 +52,9 @@ ISC_SETUP_TEST_IMPL(group) {
        isc_logdestination_t destination;
        isc_logconfig_t *logconfig = NULL;
 
-       isc_log_registercategories(lctx, categories);
+       isc_log_registercategories(categories);
 
-       logconfig = isc_logconfig_get(lctx);
+       logconfig = isc_logconfig_get();
        destination.file.stream = stderr;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
@@ -167,7 +167,7 @@ ISC_RUN_TEST_IMPL(duration) {
                isc_buffer_add(&buf1, strlen(conf) - 1);
 
                /* Parse with default line numbering */
-               result = cfg_parser_create(mctx, lctx, &p1);
+               result = cfg_parser_create(mctx, &p1);
                assert_int_equal(result, ISC_R_SUCCESS);
 
                result = cfg_parse_buffer(p1, &buf1, "text1", 0,
index 9bbd0ddd337f404c4b8334f45d99513aa9313d5a..0e9e3bf7558a7721b42134ab8975e27ec5af9b67 100644 (file)
@@ -53,9 +53,9 @@ ISC_SETUP_TEST_IMPL(group) {
        isc_logdestination_t destination;
        isc_logconfig_t *logconfig = NULL;
 
-       isc_log_registercategories(lctx, categories);
+       isc_log_registercategories(categories);
 
-       logconfig = isc_logconfig_get(lctx);
+       logconfig = isc_logconfig_get();
        destination.file.stream = stderr;
        destination.file.name = NULL;
        destination.file.versions = ISC_LOG_ROLLNEVER;
@@ -95,7 +95,7 @@ ISC_RUN_TEST_IMPL(addzoneconf) {
        char buf[1024];
 
        /* Parse with default line numbering */
-       result = cfg_parser_create(mctx, lctx, &p);
+       result = cfg_parser_create(mctx, &p);
        assert_int_equal(result, ISC_R_SUCCESS);
 
        for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
@@ -143,7 +143,7 @@ ISC_RUN_TEST_IMPL(parse_buffer) {
        isc_buffer_add(&buf1, sizeof(text) - 1);
 
        /* Parse with default line numbering */
-       result = cfg_parser_create(mctx, lctx, &p1);
+       result = cfg_parser_create(mctx, &p1);
        assert_int_equal(result, ISC_R_SUCCESS);
 
        result = cfg_parse_buffer(p1, &buf1, "text1", 0, &cfg_type_namedconf, 0,
@@ -155,7 +155,7 @@ ISC_RUN_TEST_IMPL(parse_buffer) {
        isc_buffer_add(&buf2, sizeof(text) - 1);
 
        /* Parse with changed line number */
-       result = cfg_parser_create(mctx, lctx, &p2);
+       result = cfg_parser_create(mctx, &p2);
        assert_int_equal(result, ISC_R_SUCCESS);
 
        result = cfg_parse_buffer(p2, &buf2, "text2", 100, &cfg_type_namedconf,
index 324fc1d7cf3b84a3b272f2c093da6265691858e9..b155637c4dd3459979cde7f7af002a546ec29d49 100644 (file)
@@ -33,7 +33,6 @@
 #include <tests/isc.h>
 
 isc_mem_t *mctx = NULL;
-isc_log_t *lctx = NULL;
 isc_loop_t *mainloop = NULL;
 isc_loopmgr_t *loopmgr = NULL;
 isc_nm_t *netmgr = NULL;