unusual syntax error while parsing .conf file
I upgraded from 1.6.9 ro 2.0.8 but am using same .conf file, which on 1.6.9. works perfectly. The only line that gives me error (but syslog-ng 2.0.8 then works normally if i comment it out) in 2.0.8 is destination d_root { usertty("root" template("$MSGONLY\n")); }; Has this changed? I get syslog-ngsyntax error 273 if I start it. (273 is line in .conf file which i mention in this email). Thank you in advance _________________________________________________________________ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
On Mon, 2008-06-09 at 15:16 +0200, Andrej Lobovski wrote:
I upgraded from 1.6.9 ro 2.0.8 but am using same .conf file, which on 1.6.9. works perfectly.
The only line that gives me error (but syslog-ng 2.0.8 then works normally if i comment it out) in 2.0.8 is
destination d_root { usertty("root" template("$MSGONLY\n")); };
Has this changed?
I get syslog-ngsyntax error 273 if I start it. (273 is line in .conf file which i mention in this email).
Thank you in advance
The usertty destination does not support templates in syslog-ng 2.0.x, but this has not been reported before. (e.g. noone used templates and usertty together with 2.0.x so far) It uses this hard-wired format: g_snprintf(buf, sizeof(buf), "%s %s %s\n", timestamp->str, msg->host.str, msg->msg.str); So if you remove the template it'll work, and please file a bugreport in bugzilla.balabit.com about this. Thanks in advance, -- Bazsi
So this line (in 1.6.9.):
destination d_root { usertty("root" template("$MSGONLY\n")); };
is equal to this line (2.0.8.):
g_snprintf(buf, sizeof(buf), "%s %s %s\n", timestamp->str, msg->host.str, msg->msg.str);
? If not, which line can replace the 1.6.9. version one, mentioned in this mail? Thank you in advance! Andrej _________________________________________________________________ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
Hi Andrej, I think you misunderstood. Bazsi said that templates do not work with usertty in 2.0.8. You will have to remove the template from your definition. The piece of C code he included was just to show you what will be sent to usertty when you have no template. Joe. ________________________________ From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Andrej Lobovski Sent: 10 June 2008 11:37 To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] unusual syntax error while parsing .conf file So this line (in 1.6.9.):
destination d_root { usertty("root" template("$MSGONLY\n")); };
is equal to this line (2.0.8.):
g_snprintf(buf, sizeof(buf), "%s %s %s\n", timestamp->str, msg->host.str, msg->msg.str);
? If not, which line can replace the 1.6.9. version one, mentioned in this mail? Thank you in advance! Andrej ________________________________ Discover the new Windows Vista Learn more!<http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE>
participants (3)
-
Andrej Lobovski
-
Balazs Scheidler
-
Fegan, Joe