[syslog-ng]$HOST $YEAR, etc not working correctly..

Doug Peterson syslog-ng@lists.balabit.hu
Wed, 25 Feb 2004 12:16:24 -0800 (PST)


--- Balazs Scheidler <bazsi@balabit.hu> wrote:
> 
> strange, the problem seems to be that you reference marcos like
> $YEAR_$MONTH_
> 
> which is interpeted as $YEAR_ concatenated with $MONTH_, these are
> undefined macros, thus are expanded to an empty string.
> 
> Try escaping the underscore with a backslash, like
> 
> $YEAR\_$MONTH\_


I escaped out the _ characters, and am still getting the same results with 1.6.2.. files are being
written as messages_25 (25 being $DAY)

My rules now look like this:

destination messages.network {
file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages\_$HOST\_$YEAR\_$MONTH\_$DAY"
                                owner(root) group(sysadmin) perm(0640) dir_perm(0700)
create_dirs(yes) ); };

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools