Bind 9 Administrator Reference Manual

Chapter 6. BIND 9 Configuration Reference
are rolled as described above and a new one begun. If there is no versions option, no more data will be
written to the log until some out-of-band mechanism removes or truncates the log 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 man page. How syslog will handle messages sent to this facility is described in
the syslog.conf man page. If you have a system which uses a very old version of syslog that only uses
two arguments to the openlog() function, then this clause is silently ignored.
The severity clause works like syslogs "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 a configuration.
The server can supply extensive debugging information when it is in debugging mode. If the server’s
global 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
trace. The global debug level can be set to zero, and debugging mode turned off, by running ndc
notrace. All debugging messages in the server have a debug level, and higher debug levels give more
detailed output. Channels that specify a specific debug severity, for example:
channel "specific_debug_level" {
file "foo";
severity debug 3;
};
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.
53