DekGenius.com
I l@ve RuBoard Previous Section Next Section

10.6 Determining Which Category a Message Is In

10.6.1 Problem

You need to determine which logging category a particular message is in.

10.6.2 Solution

With a BIND 9 name server, add a channel substatement to the logging statement in named.conf, redefining the default_syslog channel so that the name server prints the category of all messages. For example:

logging {
    channel default_syslog {
        syslog daemon;        // usually the default
        print-category yes;
    };
};

Then wait for the message in question to reappear, or induce the name server to log it again. The name server will print the category of the message just before the message itself. For example:

Jun 26 16:31:56 ns1 named[62314]: general: loading configuration from '/etc/named.conf'

This shows that this message is in the general category.

BIND 8 name servers won't let you redefine the default_syslog channel, so define a new syslog channel and assign the default category of messages to it:

logging {

    channel new_syslog {
        syslog daemon;
        print-category yes;
    };

    category default { new_syslog; };

};

10.6.3 Discussion

You can use the same technique to find out the severity a given message is logged at; just use the print-severity substatement instead of print-category.

10.6.4 See Also

"The Logging Statement" in Chapter 7 of DNS and BIND.

    I l@ve RuBoard Previous Section Next Section