logging to a pipe?

Danny Mayer mayer at gis.net
Fri Aug 27 15:18:10 UTC 2004


At 07:05 AM 8/26/2004, Marten Lehmann wrote:
> > Correct. The ARM makes it crystal-clear that the reserved word "file"
> > is followed by a pathname enclosed in double quotes.
>
>Ok so far. But I need to parse the log in realtime and what's easier
>than logging to a script which can select the useful entries and react
>accordingly? A script can receive input continuesly but it's hard to
>read only new entries of a logfile, especially when it's truncated or
>renamed after a certain size. The workaround would be to log everything
>to stderr so I could start named with
>
>named 2>&1 | /var/tmp/logger.pl
>
>But I don't know where BIND prints the stderr-output, obviously not to
>stderr.
>
>Regards
>Marten

Just have named log to a file and tail the file. I used to do that for an 
application.
You can keep tail continuously reading the file. See man tail for details.

Danny



More information about the bind-users mailing list