logging to a pipe?

Jim Reid jim at rfc1035.com
Thu Aug 26 11:14:29 UTC 2004


>>>>> "Marten" == Marten Lehmann <lehmann at cnm.de> writes:

    Marten> I changed "file" to "stderr". But where does BIND output
    Marten> it's STDERR? 

To whereever file descriptor 2 says it should go. [Hint: lsof is your
friend.] Usually that's /dev/null, which is where daemon processes
almost always redirect their standard input (fd 0), output (fd 1) and
error output (fd 2). It looks like you haven't read the BIND
documentation. Here's what the ARM has to say about the "stderr"
keyword:

	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. 

    Marten> I tried to run BIND with named | /vrmd/tmp/logger.pl, but
    Marten> named immediately quits and runs in the background.

Well, what do you expect? FYI, named doesn't "immediately quit". named
is a daemon. That means by default it detaches itself from any
controlling tty and redirects its standard input, output and error
output to /dev/null before doing any real work. Just like any other
daemon: cron, lpd, inet, etc, etc. The man page for named tells you
how to run the process in the foreground and to force all of the logs
to stderr.

I suggest you read the documentation before you next post here.


More information about the bind-users mailing list