Thank you! Jamie -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Gergely Nagy Sent: Thursday, August 25, 2011 11:19 AM To: syslog-ng@lists.balabit.hu Subject: Re: [syslog-ng] Variable issue with syslog-ng "Aldrich, Jamie S" <JSAldrich@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] ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq