[syslog-ng]Problem with program() destination [SOLVED]

Tamas MEZEI syslog-ng@lists.balabit.hu
Tue, 25 Jan 2005 18:24:11 +0100


> you want the most recent entry from the log. Unfortunately somehow it 
> alway was a left "\n", though, so you got an empty file.

I've just checked that in PHP "w+" means that every _LINE_ separated by 
"\n"'s written is rewriting the file. So if you echoing "a\nb" into a 
file opened with "w+", you'll get only "b" in the file.

As logs are like ([:alpha:]+\n)*, there's always a trailing newline 
character which caused the output logfile to be cleared and nothing was 
written into it.

Tamas