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
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
On Tue, Apr 29, 2003 at 10:59:09AM +0200, Peter Osterberg wrote:
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:
There's no such macro as time. These are the time related macros: { "DATE", M_DATE }, { "FULLDATE", M_FULLDATE }, { "ISODATE", M_ISODATE }, { "YEAR", M_YEAR }, { "MONTH", M_MONTH }, { "DAY", M_DAY }, { "HOUR", M_HOUR }, { "MIN", M_MIN }, { "SEC", M_SEC }, { "WEEKDAY", M_WEEKDAY }, { "UNIXTIME", M_UNIXTIME }, { "TZOFFSET", M_TZOFFSET }, { "TZ", M_TZ }, -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (2)
-
Balazs Scheidler
-
Peter Osterberg