[syslog-ng]program() destination

amover@libero.it amover@libero.it
Thu, 8 Mar 2001 09:18:33 +0100


(I'm sending it again cause I'm not sure the first send was successful 
so sorry if it's a duplicate)

About launching a program, specifically a perl script to do other jobs 
when some filters are matched the right code snippet is :

#!/usr/bin/perl

$fh = select (FOO);
$| = 1;
select ($fh);
open FOO, ">>/foo.log" or die $!;
while ( <STDIN> ) {
	print FOO $_;
}
close FOO;


you need the first to line to disable buffering...(that's why you 
cannot say any lines in the file)

Hope this could help the syslog-ng people :)


Amodiovalerio Verde
Computer freak and consultant
amover@libero.it