[syslog-ng]1.6.0rc3 released - still has macro issues
Balazs Scheidler
syslog-ng@lists.balabit.hu
Tue, 29 Apr 2003 15:20:11 +0200
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