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

Category

Type of Messages Logged

cname

Messages recording CNAME references.

config

Messages about configuration file processing.

db

Messages that log database operations.

default

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

eventlib

Messages containing debugging data from the event system.

insist

Messages that report internal consistency check failures.

lame-servers

Messages about lame server delegations.

load

Messages about loading the zone.

maintenance

Messages reporting maintenance events.

ncache

Messages about negative caching.

notify

Messages tracing the DNS NOTIFY protocol.

os

Messages reporting operating system problems.

packet

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

panic

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

parser

Messages about configuration command processing.

queries

Messages about every DNS query received.

response-checks

Messages reporting the results of response checking.

security

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

statistics

Messages containing server statistics.

update

Messages concerning dynamic updates.

xfer-in

Messages recording inbound zone transfers.

xfer-out

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