Re: external logger?

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Sun, 25 Oct 1998 20:31:52 -0700 (MST)

On Mon, 26 Oct 1998, Henrik Nordstrom wrote:

> Sort of. Turn of log rotation and use a named pipe for
> log file. Then have a separate program that reads the pipe.

Or write a simple Perl script with "tail -f" functionality that will read
the [standard] log file and pipe the lines to your external logger.
 
> The downside is that you need to make sure that the log program
> is running all the time, or Squid will complain heavily.

The script solution avoids this problem since a script can preserve the last
position read (and piped to the logger). Should script die, it can be
restarted from the saved position. Rotation of logs is not a big problem
either since it is easy to detect in the script (file size gets smaller).

In short, you get a more robust solution, but you pay with disk space and
your time to write the script.

We used to have a similar script here to restart beta Squid versions when a
particular string appears in the cache.log. We do not use it now though.

$0.02,

Alex.
Received on Sun Oct 25 1998 - 20:22:07 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:47 MST