[syslog-ng]$HOST $YEAR, etc not working correctly..
Richard E. Perlotto II
syslog-ng@lists.balabit.hu
Wed, 3 Mar 2004 11:34:46 -0800
I saw this as well, and replaced all the underscores with dashes. This
problem started with 1.6.x.
Richard
-----Original Message-----
From: syslog-ng-admin@lists.balabit.hu =
[mailto:syslog-ng-admin@lists.balabit.hu] On Behalf Of Doug Peterson
Sent: Wednesday, March 03, 2004 11:08 AM
To: syslog-ng@lists.balabit.hu
Subject: RE: [syslog-ng]$HOST $YEAR, etc not working correctly..
--- Balazs Scheidler <bazsi@balabit.hu> wrote:
> 2004-02-25, sze keltez=E9ssel 21:16-kor Doug Peterson ezt =EDrta:
> > --- Balazs Scheidler <bazsi@balabit.hu> wrote:
> > >=20
> > > strange, the problem seems to be that you reference marcos like=20
> > > $YEAR_$MONTH_
> > >=20
> > > which is interpeted as $YEAR_ concatenated with $MONTH_, these are =
> > > undefined macros, thus are expanded to an empty string.
> > >=20
> > > Try escaping the underscore with a backslash, like
> > >=20
> > > $YEAR\_$MONTH\_
> >=20
> >=20
> > I escaped out the _ characters, and am still getting the same=20
> > results with 1.6.2.. files are
> being
> > written as messages_25 (25 being $DAY)
> >=20
> > My rules now look like this:
> >=20
> > destination messages.network {=20
> > =
file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages\_$HOST\_$YEAR\_$MON=
TH\_$DAY"
> > owner(root) group(sysadmin)=20
> > perm(0640) dir_perm(0700)
> > create_dirs(yes) ); };
>=20
>=20
> This definitely works here. syslog-ng uses gperf to generate a lookup=20
> hash for macro names. A generated file is shipped with syslog-ng to=20
> avoid the build dependency on gperf, but maybe it was regenerated for=20
> some reason.
>=20
> This area had a bug in 1.6.0rc2 (before or after this version should=20
> be ok), are you sure you are running 1.6.2?
>=20
> --
> Bazsi
I am running: syslog-ng 1.6.0rc1 currently, and that is the most recent =
version that works (I'm not sure if I tried rc2).=20
When I install 1.6.2 I encounter the macro problem, even when I escape =
the underscore.=20
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you=92re looking for faster =
http://search.yahoo.com _______________________________________________
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