2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

565. [func] Log queries more like BIND 8: query logging is now

done to category queries, level info. [RT #169]
This commit is contained in:
Andreas Gustafsson
2000-11-23 01:32:48 +00:00
parent ab13b279ae
commit 86a4d80e06
4 changed files with 9 additions and 8 deletions

View File

@@ -27,9 +27,8 @@
566. [func] New public function dns_timer_setidle(). 566. [func] New public function dns_timer_setidle().
565. [func] Log queries more like BIND 8. Query logging is done 565. [func] Log queries more like BIND 8: query logging is now
to category "general", module "query", debug level 1. done to category "queries", level "info". [RT #169]
[RT #169]
564. [func] Add sortlist support to lwresd. 564. [func] Add sortlist support to lwresd.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: log.h,v 1.15 2000/08/01 01:12:07 tale Exp $ */ /* $Id: log.h,v 1.16 2000/11/23 01:32:46 gson Exp $ */
#ifndef NAMED_LOG_H #ifndef NAMED_LOG_H
#define NAMED_LOG_H 1 #define NAMED_LOG_H 1
@@ -31,6 +31,7 @@
#define NS_LOGCATEGORY_CLIENT (&ns_g_categories[1]) #define NS_LOGCATEGORY_CLIENT (&ns_g_categories[1])
#define NS_LOGCATEGORY_NETWORK (&ns_g_categories[2]) #define NS_LOGCATEGORY_NETWORK (&ns_g_categories[2])
#define NS_LOGCATEGORY_UPDATE (&ns_g_categories[3]) #define NS_LOGCATEGORY_UPDATE (&ns_g_categories[3])
#define NS_LOGCATEGORY_QUERIES (&ns_g_categories[4])
/* /*
* Backwards compatibility. * Backwards compatibility.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: log.c,v 1.24 2000/09/26 22:12:13 bwelling Exp $ */ /* $Id: log.c,v 1.25 2000/11/23 01:32:44 gson Exp $ */
#include <config.h> #include <config.h>
@@ -32,6 +32,7 @@ static isc_logcategory_t categories[] = {
{ "client", 0 }, { "client", 0 },
{ "network", 0 }, { "network", 0 },
{ "update", 0 }, { "update", 0 },
{ "queries", 0 },
{ NULL, 0 } { NULL, 0 }
}; };

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: query.c,v 1.154 2000/11/23 01:18:34 gson Exp $ */ /* $Id: query.c,v 1.155 2000/11/23 01:32:45 gson Exp $ */
#include <config.h> #include <config.h>
@@ -3242,7 +3242,7 @@ log_query(ns_client_t *client) {
char typename[DNS_RDATATYPE_FORMATSIZE]; char typename[DNS_RDATATYPE_FORMATSIZE];
char classname[DNS_RDATACLASS_FORMATSIZE]; char classname[DNS_RDATACLASS_FORMATSIZE];
dns_rdataset_t *rdataset; dns_rdataset_t *rdataset;
int level = ISC_LOG_DEBUG(1); int level = ISC_LOG_INFO;
if (! isc_log_wouldlog(ns_g_lctx, level)) if (! isc_log_wouldlog(ns_g_lctx, level))
return; return;
@@ -3253,7 +3253,7 @@ log_query(ns_client_t *client) {
dns_rdataclass_format(rdataset->rdclass, classname, sizeof(classname)); dns_rdataclass_format(rdataset->rdclass, classname, sizeof(classname));
dns_rdatatype_format(rdataset->type, typename, sizeof(typename)); dns_rdatatype_format(rdataset->type, typename, sizeof(typename));
ns_client_log(client, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_QUERY, ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY,
level, "query: %s %s %s", namebuf, classname, typename); level, "query: %s %s %s", namebuf, classname, typename);
} }