[syslog-ng]1.6.0rc3 released - still has macro issues

Peter Osterberg syslog-ng@lists.balabit.hu
Tue, 29 Apr 2003 10:59:09 +0200


Since I had macros that didn't expand at all using rc2 I was happy to see 
the release of rc3.

Unfortunately there still are some macro issues in rc3 when using it on 
Slackware 9.0

The following conf file:
destination d_mysql {
   pipe("/tmp/mysql.pipe"
   template("INSERT INTO logs (host, facility, priority, level,
             tag, date, time, program, msg) VALUES
             ('$HOST', '$FACILITY', '$PRIORITY', '$LEVEL',
             '$TAG', '$DATE', '$TIME', '$PROGRAM', $MSG');\n")
             template-escape(yes)
           );
   };

Epand like this
INSERT INTO logs (host, facility, priority, level, tag, date, time, 
program, msg) VALUES ('hansen', 'syslog', 'notice', 'notice', '2d', 'Apr 28 
22:23:37', '', 'syslog-ng', syslog-ng[13070]: STATS: dropped 0');

As you can see both date and time are expanded in $DATE and $TIME isn't 
expanded at all.

Result in the database table looks like this:
mysql> select * from logs;
+--------+----------+----------+--------+------+------------+----------+-----------+------------------------------------+-----+
| host   | facility | priority | level  | tag  | date       | time     | 
program   | msg                                | seq |
+--------+----------+----------+--------+------+------------+----------+-----------+------------------------------------+-----+
| hansen | syslog   | notice   | notice | 2d   | 0000-00-00 | 00:00:00 | 
syslog-ng | syslog-ng[13070]: STATS: dropped 0 |   1 |
+--------+----------+----------+--------+------+------------+----------+-----------+------------------------------------+-----+

And as you all can see the expanded $DATE returns a value that can't be 
handled by the mysql date data type.

Clues, tips, tricks? Anyone!

/p


At 09:45 2003-04-26 +0200, you wrote:
>Hi,
>
>I have released 1.6.0rc3 which should resolve the macro issue in 1.6.0rc2
>
>I still have a backlog of applying patches, I hope to get them integrated by
>the final 1.6.0 version. Here is the NEWS entry:
>
>News for the 1.6.0rc3 release
>         Fri, 25 Apr 2003 08:56:57 +0200
>
>         * fixed TCP wrapper detection for Solaris
>         * fixed macro expansion which had a bug in 1.6.0rc2
>
>
>--
>Bazsi
>PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
>_______________________________________________
>syslog-ng maillist  -  syslog-ng@lists.balabit.hu
>https://lists.balabit.hu/mailman/listinfo/syslog-ng
>Frequently asked questions at http://www.campin.net/syslog-ng/faq.html