Commit 7ad4d54f authored by Mark Andrews's avatar Mark Andrews
Browse files

1537. [func] New option "querylog". If set specify whether query

                        logging is to be enabled or disabled at startup.
parent 029a79c8
......@@ -130,7 +130,8 @@
1538. [placeholder] rt9997
1537. [placeholder] rt9989
1537. [func] New option "querylog". If set specify whether query
logging is to be enabled or disabled at startup.
1536. [bug] Windows socket code failed to log a error description
when returning ISC_R_UNEXPECTED. [RT #9998]
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.414 2004/02/27 20:41:42 marka Exp $ */
/* $Id: server.c,v 1.415 2004/03/02 01:14:59 marka Exp $ */
#include <config.h>
......@@ -2499,23 +2499,31 @@ load_configuration(const char *filename, ns_server_t *server,
if (first_time) {
cfg_obj_t *logobj = NULL;
cfg_obj_t *categories = NULL;
(void)cfg_map_get(config, "logging", &logobj);
if (logobj != NULL)
(void)cfg_map_get(logobj, "category", &categories);
if (categories != NULL) {
cfg_listelt_t *element;
for (element = cfg_list_first(categories);
element != NULL;
element = cfg_list_next(element))
{
cfg_obj_t *catobj;
char *str;
obj = cfg_listelt_value(element);
catobj = cfg_tuple_get(obj, "name");
str = cfg_obj_asstring(catobj);
if (strcasecmp(str, "queries") == 0)
server->log_queries = ISC_TRUE;
obj = NULL;
if (ns_config_get(maps, "querylog", &obj) == ISC_R_SUCCESS) {
server->log_queries = cfg_obj_asboolean(obj);
} else {
(void)cfg_map_get(config, "logging", &logobj);
if (logobj != NULL)
(void)cfg_map_get(logobj, "category",
&categories);
if (categories != NULL) {
cfg_listelt_t *element;
for (element = cfg_list_first(categories);
element != NULL;
element = cfg_list_next(element))
{
cfg_obj_t *catobj;
char *str;
obj = cfg_listelt_value(element);
catobj = cfg_tuple_get(obj, "name");
str = cfg_obj_asstring(catobj);
if (strcasecmp(str, "queries") == 0)
server->log_queries = ISC_TRUE;
}
}
}
}
......
......@@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
<!-- File: $Id: Bv9ARM-book.xml,v 1.236 2004/02/27 05:10:41 marka Exp $ -->
<!-- File: $Id: Bv9ARM-book.xml,v 1.237 2004/03/02 01:15:00 marka Exp $ -->
<book>
<title>BIND 9 Administrator Reference Manual</title>
......@@ -2624,7 +2624,12 @@ the <command>null</command> channel.</para></entry>
</row>
<row rowsep = "0">
<entry colname = "1"><para><command>queries</command></para></entry>
<entry colname = "2"><para>Queries. Using the category <command>queries</command> will enable query logging.</para></entry>
<entry colname = "2"><para>Specify where queries should be logged to.</para>
<para>
At startup, specifing the category <command>queries</command> will also
enable query logging unless <command>querylog</command> option has been
specified.
</para></entry>
</row>
<row rowsep = "0">
<entry colname = "1"><para><command>dispatch</command></para></entry>
......@@ -2823,6 +2828,7 @@ statement in the <filename>named.conf</filename> file:</para>
<optional> preferred-glue ( <replaceable>A</replaceable> | <replaceable>AAAA</replaceable> | <replaceable>NONE</replaceable> ); </optional>
<optional> edns-udp-size <replaceable>number</replaceable>; </optional>
<optional> root-delegation-only <optional> exclude { <replaceable>namelist</replaceable> } </optional> ; </optional>
<optional> querylog <replaceable>yes_or_no</replaceable> ; </optional>
};
<optional> disable-algorithms <replaceable>domain</replaceable> { <replaceable>algorithm</replaceable>; <optional> <replaceable>algorithm</replaceable>; </optional> }; </optional>
</programlisting>
......@@ -3338,6 +3344,14 @@ named behaves as if it does not support DNSSEC.
The default is <userinput>no</userinput>.
</para></listitem></varlistentry>
<varlistentry><term><command>querylog</command></term>
<listitem>
<para>
Specify whether query logging should be started when named start.
If <command>querylog</command> is not specified then the query logging
is determined by the presence of the logging category <command>queries<command>.
</para></listitem></varlistentry>
</variablelist>
</sect3>
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: namedconf.c,v 1.27 2004/02/27 20:41:51 marka Exp $ */
/* $Id: namedconf.c,v 1.28 2004/03/02 01:15:00 marka Exp $ */
#include <config.h>
......@@ -596,6 +596,7 @@ options_clauses[] = {
{ "named-xfer", &cfg_type_qstring, CFG_CLAUSEFLAG_OBSOLETE },
{ "pid-file", &cfg_type_qstringornone, 0 },
{ "port", &cfg_type_uint32, 0 },
{ "querylog", &cfg_type_boolean, 0 },
{ "recursing-file", &cfg_type_qstring, 0 },
{ "random-device", &cfg_type_qstring, 0 },
{ "recursive-clients", &cfg_type_uint32, 0 },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment