[syslog-ng] config file parsing bugs in syslog-ng 3.0.7

Matthew Hall mhall at mhcomputing.net
Tue Jul 27 04:43:59 CEST 2010


Hello list,

In the course of my work I discovered two small defects in syslog-ng 
syslog-ng 3.0.7. Since I am not familiar enough with the code to patch 
these I am trying to do the best I can by reporting them to the experts. 
There are workarounds for these.

I am in the process of doing some other work on the product which I 
would like to contribute back in the near future after I figure out how 
the open-source contribution process works at this new company I joined.

Thank you for providing this product. I am impressed with the 
documentation and all of the capabilities and I look forward to becoming 
more expert with it over the coming few months.

Best Regards,
Matthew Hall.

1) specifying the flags directive in a log stanza other than in the last 
position causes a syntax error

This specific format works:

log {
    filter(filter_local1);
    destination(dst_local1);
    parser(parse_switch);
    flags(final);
};

Any format like this raises an error:

log {
    filter(filter_local1);
    destination(dst_local1);
    flags(final);
    parser(parse_switch);
};

Is there some reason why or just a parser glitch?

2) using a version directive newer than the daemon version has 
unexpected behavior

If I feed 3.0 a file marked with @version: 3.1 tag, I get this error:

Configuration file has no version number, assuming syslog-ng 2.1 format. 
Please add @version: maj.min to the beginning of the file;

I think it does not make sense to fall back to the oldest format if the 
file has a newer version tag. Would it be better to try to process the 
file as the newest version with a warning, or print an error that the 
file is too new for 3.0 to read?


More information about the syslog-ng mailing list