[syslog-ng]template() buggy for program()?
Balazs Scheidler
syslog-ng@lists.balabit.hu
Mon, 22 Mar 2004 12:55:33 +0100
2004-03-21, v keltezéssel 20:29-kor Loic Minier ezt írta:
> Balazs Scheidler <bazsi@balabit.hu> - Sat, Mar 20, 2004:
>
> > hmm.. what is your syslog-ng version?
>
> I am using syslog-ng-1.6.2 built with libol-0.3.13 and gcc under
> Solaris 8 (sparc).
you are right, this is a bug. syslog-ng always prepends the priority
field even when a template is used. Try this patch:
Index: afprogram.c
===================================================================
RCS file: /var/cvs/syslog-ng/syslog-ng/src/afprogram.c,v
retrieving revision 1.7
diff -u -r1.7 afprogram.c
--- afprogram.c 31 Jan 2003 14:26:48 -0000 1.7
+++ afprogram.c 22 Mar 2004 11:55:07 -0000
@@ -142,8 +142,7 @@
struct ol_string *msg_line;
if (self->template_output) {
- msg_line = c_format("<%i>%fS",
- msg->pri,
+ msg_line = c_format("%fS",
expand_macros(
self->cfg,
self->template_output,
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1