The logging Statement

The logging statement defines the logging options for the server. The syntax of the logging command for BIND 8 is shown in Listing B.3.

Listing B.3: BIND 8 logging Command Syntax logging {

[ channel channel_name { ( file pathname

[ versions number|unlimited ] [ size size ] |syslog (kern|user|mail|daemon|auth|syslog|lpr |news|uucp|cron|authpriv|ftp |local0|local1|local2|local3 |local4|local5|local6|local7)

[ severity critical|error|warning|notice

|info|debug [level]|dynamic; ] [ print-category yes|no; ] [ print-severity yes|no; ] [ print-time yes|no; ] }; ]

[ category category_name {

The logging statement can include two different types of subordinate clauses: the channel clause and the category clause. The channel clause defines how logging messages are handled. Messages are written to a file (file), sent to syslogd (syslog), or discarded (null). If a file is used, you can specify how many old versions are retained (versions), and how large the log file is allowed to grow (size). If syslogd is used, select a syslogd facility, such as daemon or authpriv, to log the messages. For both types of logging, you can also specify the severity of the messages written to the log (severity), and that the time (print-time), category (print-category), and severity (print-severity) of the message be included in the log entry.

The category clause defines the category of messages sent to the channel. Thus, the category clause defines what is logged, and the channel clause defines where it is logged. The logging categories are listed in Table B.3.

Table B.3: BIND 8 Logging Categories


Type of Messages Logged


Messages recording CNAME references.


Messages about configuration file processing.


Messages that log database operations.


Various types of messages. This is the default if nothing is specified.


Messages containing debugging data from the event system.


Messages that report internal consistency check failures.


Messages about lame server delegations.


Messages about loading the zone.


Messages reporting maintenance events.


Messages about negative caching.


Messages tracing the DNS NOTIFY protocol.


Messages reporting operating system problems.


Messages containing dumps of all of the packets sent and received.


Messages generated by a fault that causes the server to shut down.


Messages about configuration command processing.


Messages about every DNS query received.


Messages reporting the results of response checking.


Messages concerning the application of security criteria. These are most meaningful if allow-update, allow-query, and allow-transfer options are in use.


Messages containing server statistics.


Messages concerning dynamic updates.


Messages recording inbound zone transfers.


Messages recording outbound zone transfers.

The BIND 9 logging statement is very similar to the BIND 8 command. It has the same channel and category clauses, although some of the options in those clauses are different. The BIND 9 logging command syntax is shown in Listing B.4.

Listing B.4: BIND 9 logging Command Syntax logging {

[ channel channel_name { ( file pathname

[ versions number|unlimited ] [ size size ] |syslog kern|user|mail|daemon|auth|syslog|lpr |news|uucp|cron|authpriv|ftp |local0|local1|local2|local3 |local4|local5|local6|local7

[ severity critical|error|warning|notice

|info|debug [ level]|dynamic; ] [ print-category yes|no; ] [ print-severity yes|no; ]

[ category category_name {

The channel clause is the same as it was in BIND 8, with only the addition of stderr as a possible destination for messages. The category clause looks the same, but the categories have changed. A dozen categories shown in Table B.3 are no longer supported: cname, eventlib, insist, load, maintenance, ncache, os, packet, panic, parser, response-check, and statistics. Ten of the categories listed in Table B.3 remain: config, db, default, lame-server, notify, queries, security, update, xfer-in, and xfer-out, although one category has been renamed from db to database. Six new categories have been added for BIND 9:

general A wide variety of messages.

resolver Messages that relate to DNS resolution.

client Messages that concern processing of client requests.

network Messages that relate to network operations.

dispatch Messages that trace packets sent to various server modules.

dnssec Messages that track the processing of the DNSSEC and TSIG protocols.

Most servers use the default logging configuration, which logs messages through syslogd using the default category. To find out more about custom log configurations, see Linux DNS Server Administration, by Craig Hunt, which is also part of the Craig Hunt Linux Library.

Was this article helpful?

0 0

Post a comment