[syslog-ng]template() buggy for program()?

Loic Minier syslog-ng@lists.balabit.hu
Fri, 19 Mar 2004 15:42:01 +0100


   Hi,

 My Perl program launched by syslog-ng with a program() destination
 receives logs in this form:
 "<182>Mar 19 14:35:00 met-ixb postfix/smtpd[3234]: connect from l
 ocalhost[127.0.0.1]"

 (ie the log starts with '<', '1', '8', '2', '>'.)

 The *same* log line appears as:
 "Mar 19 14:35:00 hostname postfix/smtpd[3234]: connect from
 localhost[127.0.0.1]"

 in a file destination.

 My config looks like:
    destination dp_parse {
        program("/path/to/perl/program" template("$DATE $MSG\n"));
    };
    destination df_tech {
        file("/path/to/file/tech.log" template("$DATE $HOST $MSG\n"));
    };

 I am confused about this behavior, is it normal for a program() output
 to receive a syslog header?

-- 
Loïc Minier <lool@dooz.org>