HP-UX Reference (11i v2 04/09) - 4 File Formats (vol 8)
n
named.conf(4) named.conf(4)
};
In BIND 9.2, the logging configuration is established only when the entire configuration file has been
parsed. In BIND 8, it was established as soon as the
logging statement was parsed. When the server
starts up, all logging messages related to syntax errors in the configuration file go to the default channels,
or to standard error if the
-g option was specified.
The channel Phrase
All log output goes to one or more user defined or pre-defined channels ; Every channel definition must
include a destination clause that says whether messages selected for the channel go to a file, or to a par-
ticular syslog facility, or to the standard error stream, or are discarded. It can optionally also limit the
message severity level that will be accepted by the channel (the default is
info) , and whether to include
a named-generated time stamp, the category name and/or severity level (the default is not to include
any). The channel options are irrelevant when the
null destination clause discards all messages sent to
the channel.
The
file destination clause directs the channel to a disk file. It can include limitations both on file size
limit and number of versions of the file, 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, and
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 files 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 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) man page. The syslog(3C) man page describes how syslog will handle mes-
sages 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 syslog destination clause is 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. If you are using
syslog, then the syslog.conf priorities will also determine what eventually passes through.
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
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 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 flag followed by a positive integer, or by running rndc
Section 4−−180 Hewlett-Packard Company − 5 − HP-UX 11i Version 2: September 2004