From c8ca2bc590f67200798bae2e9c24f9c2a3888ca4 Mon Sep 17 00:00:00 2001 From: James Brister Date: Fri, 17 Dec 1999 18:28:03 +0000 Subject: [PATCH] Use proper logging in test. --- bin/tests/nconf_test.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/tests/nconf_test.c b/bin/tests/nconf_test.c index ba53a5d97a..82f3696215 100644 --- a/bin/tests/nconf_test.c +++ b/bin/tests/nconf_test.c @@ -80,6 +80,7 @@ int main (int argc, char **argv) { FILE *outfp; isc_mem_t *mem = NULL; dns_c_cbks_t callbacks; + isc_log_t *log = NULL; #if 1 callbacks.zonecbk = NULL; @@ -107,6 +108,14 @@ int main (int argc, char **argv) { RUNTIME_CHECK(isc_mem_create(0, 0, &mem) == ISC_R_SUCCESS); + RUNTIME_CHECK(isc_log_create(mem, &log) == ISC_R_SUCCESS); + RUNTIME_CHECK(dns_log_init(log) == ISC_R_SUCCESS); + + RUNTIME_CHECK(isc_log_usechannel(log, "default_stderr", NULL, NULL) + == ISC_R_SUCCESS); + + dns_lctx = log; + if (dns_c_parse_namedconf(conffile, mem, &configctx, &callbacks) != ISC_R_SUCCESS) { fprintf(stderr, "parse_configuration failed.\n"); @@ -147,6 +156,10 @@ int main (int argc, char **argv) { } dns_c_ctx_delete(&configctx); + + dns_lctx = NULL; + isc_log_destroy(&log); + isc_mem_destroy(&mem); return (0);