[syslog-ng] tailing real files

Balazs Scheidler bazsi at balabit.hu
Fri Apr 6 12:14:07 CEST 2007


On Thu, 2007-02-22 at 21:29 +0100, Balazs Scheidler wrote:
> On Thu, 2007-02-22 at 14:00 +0100, J Bridge wrote:

> > 2. Can syslog-ng work similarly to tail -f logging to the central
> > server?
> 
> Yes. syslog-ng 2.0 can do this, however it currently does not record the
> current file position accross restarts.
> 

As of today, I've commited the final bits, so that tailing files is
actually usable. Configure it something like this:

source s_tail { file("/var/log/apache/access.log" follow_freq(1) flags(no-parse)); };

This means that syslog-ng
* reads the access.log file (starting with the first line),
* checks every 1 second to see if there are new records
* notices when access.log gets renamed and a new file is put to its
place (e.g. logrotate)
* remember the last file position accross restarts

You need tomorrow's snapshot for this to work.

-- 
Bazsi



More information about the syslog-ng mailing list