Configuring and Managing MPE/iX Internet Services (August 2002)
Appendix C
BIND 8.1 Enhanced Features
BIND 8 Highlights
224
}; ]
[ category category_name {
channel_name; [ channel_name; ... ]
}; ]
...
};
Definition and Usage
The logging statement configures a wide variety of logging options for the nameserver. Its channel phrase
associates output methods, format options and severity levels with a name that can then be used with the
category phrase to select how various classes of messages are logged.
Only one logging statement is used to define as many channels and categories as are wanted. If there are
multiple logging statements in a configuration, the first defined determines the logging, and warnings are
issued for the others. If there is no logging statement, the logging configuration will be:
logging {
category default { default_syslog; default_debug; };
category panic { default_syslog; default_stderr; };
category packet { default_debug; };
category eventlib { default_debug; };
};
The Channel Phrase
All log output goes to one or more “channels”; make as many of them as you want.
Every channel definition must include a clause that says whether messages selected for the channel go to a
file, to a particular syslog facility, or are discarded. It can optionally also limit the message severity level that
will be accepted by the channel (default is “info”), and whether to include a named generated time stamp, the
category name and/or severity level (default is not to include any).
The word null as the destination option for the channel will cause all messages sent to it to be discarded;
other options for the channel are meaningless.
The file clause can include limitations both on how large the file is allowed to become, and how many versions
of the file will be saved each time the file is opened.
The size option for files is simply a hard ceiling on log growth. If the file ever exceeds the size, then named will
just not write anything more to it until the file is reopened; exceeding the size does not automatically trigger
a reopen. The default behavior is to not limit the size of the file.
If you use the version logfile option, then named will retain many backup versions of the file by renaming
them when opening. For example, if you choose to keep 3 old versions of the file “lamers.log” then just before
it is opened lamers.log.1 is renamed to lames.log.2, lamers.log.0 is renamed to lamers.log.1, and
lamers.log is renamed to lamers.log.0. No rolled versions are kept by default. The unlimited keyword is
synonymous with 99 in current BIND releases.
The argument for the syslog clause is a syslog facility described earlier in this manual. How syslog will handle
messages sent to this facility is described under syslog.conf earlier in this manual. If you have a system
which uses a very old version of syslog and that only uses two arguments to the openlog() function, then this
clause is silently ignored.
The severity clause works like syslog’s “priorities”, except that they can also be used if you are writing
straight to a file rather than using syslog. Messages which are not at least of the severity level given will not
be selected for the channel; messages of higher severity levels will be accepted.