[syslog-ng] [PATCH (3.5) 0/3]: Catching template syntax errors at config time

Gergely Nagy algernon at balabit.hu
Mon Jun 10 17:58:32 CEST 2013


Following up on the previous patch that added a check to the file()
and pipe() destinations, allowing them to catch and report template
syntax errors at config time, following this mail are three others,
that do similar things to the set() and subst() rewrite functions, to
the pair() statement of value-pairs() and to templatable settings in
afamqp.

These catch these issues:

rewrite s_broken {
 set("$(+ 0", value(MESSAGE));
 subst("original", "$(+ 0", value(MESSAGE));
};

destination d_broken {
 afamqp(body("$(+ 0")
        routing-key("$(+ 0")
        value-pairs(pair("INVALID", "$(+ 0")));
};

There are a couple of more cases in the codebase where the same issue
is present, namely afsmtp() (the subject, body and header templates),
afsql (fields and table name), and perhaps in patterndb too, I have
not throughly inspected that one yet.

-- 
|8]



More information about the syslog-ng mailing list