From ff56121a989fd6dc133ed79afc4a2c1491c4c511 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 8 Aug 2000 23:57:13 +0000 Subject: [PATCH] use isc_log_wouldlog() --- bin/named/query.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/named/query.c b/bin/named/query.c index e1473e310c..de5cbbc5a2 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.123 2000/08/08 19:16:19 gson Exp $ */ +/* $Id: query.c,v 1.124 2000/08/08 23:57:13 gson Exp $ */ #include @@ -2909,6 +2909,10 @@ log_query(ns_client_t *client) { char text[256]; isc_region_t r; dns_rdataset_t *rdataset; + int level = ISC_LOG_DEBUG(1); + + if (! isc_log_wouldlog(ns_g_lctx, level)) + return; /* XXXRTH Allow this to be turned off! */ @@ -2928,7 +2932,7 @@ log_query(ns_client_t *client) { } isc_buffer_usedregion(&b, &r); ns_client_log(client, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_QUERY, - ISC_LOG_DEBUG(1), "query: %s%.*s", namebuf, + level, "query: %s%.*s", namebuf, (int)r.length, (char *)r.base); }