How to use specific log file rather than syslog?

Jim Reid jim at rfc1035.com
Thu Jan 27 18:41:43 UTC 2000


>>>>> "Steve" == Steve Snyder <swsnyder at home.com> writes:

    Steve> I want to direct all BIND (v8.2.2P5) log entries to its own
    Steve> log file rather than to the system log.

    Steve> The description of the logging{} statement is pretty
    Steve> daunting.  I'd rather not have to specify debug levels and
    Steve> create channels.  All I want is that the log entries that
    Steve> are currently sent to the system log be sent instead to
    Steve> "/var/log/named.log".

    Steve> Can someone advise me on a simple way to redirect BIND's
    Steve> logging?

Try the following:
	logging {
		channel local_log {
			/*
			 * Use a file channnel. The file is
			 * /var/log/named.log. [Why the ".log"
			 * suffix?] Keep 2 versions of the file
			 * and don't let it get bigger than 1 Mb.
			 */
			file "/var/log/named.log"
			versions 2 size 1M;
			print-time yes;
		};
		category default {
			/*
			 * Send every log category to the
			 * local_log channel defined above.
			 */
			local_log;
		};
	};



More information about the bind-users mailing list