[syslog-ng] Variable issue with syslog-ng
Gergely Nagy
algernon at balabit.hu
Thu Aug 25 18:18:50 CEST 2011
"Aldrich, Jamie S" <JSAldrich at pier1.com> writes:
> I am trying to setup syslog-ng to use the DAY and MONTH variable on the source file input. What am I doing wrong?
>
> source s_file {
> file("/psfs_logs/APPSRV_${MONTH}${DAY}.LOG" flags(no-parse));
> };
Those macros are not supported on the source side, because they're based
on when a particular message arrived, and that's understandably not
known at the time the file should be opened. (At least, to the best of
my knowledge.)
The easiest way I can think of right now, would be to set the file to
/pfs_logs/APPSRV_current.LOG or somesuch, and make it a symlink to the
most recent file (and keep it up to date with an external script).
--
|8]
More information about the syslog-ng
mailing list