named.conf.4 (2010 09)

n
named.conf(4) named.conf(4)
(BIND 9.3)
any).
The
file destination clause directs the channel to a disk file. It can include limitations on both the file
size and the number of versions of the file that are saved each time the file is opened.
If you use the
versions log file option, then
named will retain that many backup versions of the file by
renaming them when opening.
For example, if you choose to keep three old versions of the file
lamers.log, then, just before it is
opened:
lamers.log.1 is renamed to lamers.log.2
lamers.log.0 is renamed to lamers.log.1
lamers.log is renamed to lamers.log.0
Use versions unlimited; if you do not want to limit the number of versions. If a
size option is
associated with the log file, then renaming is only done when the file being opened exceeds the indicated
size. No backup versions are kept, by default; any existing log file is simply appended.
The
size option for file is used to limit log growth. If the file size exceeds the limit, then
named will
stop writing to the file unless it has a
versions option associated with it. If backup versions are kept,
the files are rolled as described above and a new file is opened. If there is no
versions option, no more
data will be written to the log until the log file is removed or truncated (by some external process) to less
than the maximum size. The default behavior is not to limit the size of the file.
Example usage of the
size and versions options:
channel "an_example_channel" {
file "example.log" versions 3 size 20m;
print-time yes;
print-category yes;
};
The
syslog destination clause directs the channel to the system log. Its argument is a syslog facility as
described in the syslog (3C) manpage. The syslog (3C) manpage also describes how syslog will handle
messages sent to this facility. If you have a system which uses a very old version of
syslog that uses
only two arguments to the
openlog() function, then the syslog destination clause is ignored.
The
stderr destination clause directs the channel to the server’s standard error stream. This is
intended for use when the server is running as a foreground process, for example when debugging the
configuration.
The
null destination clause discards all message sent to the channel, the severity and print-*
clauses irrelevant.
The
severity clause works like the syslog() priority parameter except that it can also be used if you
are writing straight to a file rather than using syslog. Messages that are not at least of the severity
level given will not be selected for the channel; messages of higher severity levels will be accepted. If you
are using the syslog option, then the syslog.conf priorities will also determine what eventually
passes through (see syslogd (1M)).
For example, defining a channel facility and severity as
daemon and debug but only logging
daemon.warning via syslog.conf will cause messages of severity info and notice to be
dropped. If the situation were reversed, with named writing messages of only warning or higher, then
syslogd would print all messages it received from the channel.
The server can supply extensive debugging information when it is in debugging mode. If the server’s glo-
bal debug level is greater than zero, then debugging mode will be active. The global debug level is set
either by starting the
named server with the -d option followed by a positive integer, or by running
rndc trace. The global debug level can be set to zero, and debugging mode turned off, by running
rndc notrace. All debugging messages in the server have a debug level, and higher debug levels give
more detailed output. For example:
channel "specific_debug_level" {
file "foo";
severity debug 3;
};
In this example, channels that specify a particular debug severity will get debugging output of level 3 or
less any time the server is in debugging mode, regardless of the global debugging level. Channels with
dynamic severity use the server’s global level to determine what messages to print.
6 Hewlett-Packard Company 6 HP-UX 11i Version 3: September 2010