[syslog-ng] OSE 3.4(.1) block() argument parse issue

Gergely Nagy algernon at balabit.hu
Sat Mar 30 11:04:39 CET 2013


Hi!

Eric Berggren <eric_berggren at apple.com> writes:

> syslog-ng OSE 3.4.1 is unable to parse the "Example 5.8: Passing
> arguments to blocks" excerpt in the v3.4 admin guide, which
> exemplifies a common construct used in our current 3.2 config :
>
> @version: 3.4
>
> block source s_logfile (filename("messages")) {
>   file("/var/log/`filename`" );
> };
> source s_example {
>   s_logfile(filename("logfile.log"));
> };
>
> host# ./syslog-ng -s -f ./s2.conf :
>
> Error parsing affile, syntax error, unexpected LL_IDENTIFIER in source block s_logfile at line 2, column 19:
>                                                   included from /home/eberggren/proj/syslog-ng/config/s2.conf line 7, column 36
>
>   file("/var/log/"logfile.log
>                   ^^^^^^^^^^^
>
> 3.3.8 appears to be okay with it, however (and our existing 3.2 config).

Until the problem is properly fixed, dropping the quotes around the
filename appears to be a reasonable workaround:

block source s_logfile (filename(messages)) {
  file("/var/log/`filename`" );
};
source s_example {
  s_logfile(filename(logfile.log));
};

Not that great, but this works in both 3.3 and 3.4 (I have not tested
3.2, but I suspect that'd work too).

-- 
|8]



More information about the syslog-ng mailing list