cfg-grammar: remove type info from options_item

It doesn't really return values, so don't declare types.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
cfg-grammar.y: introduce separate rule for LogTemplateOptions

In order to use common rules to parse template related options, introduce
a separate rule for parsing stuff into LogTemplateOptions.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
templates: constify LogTemplateOptions

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
affile: use common code to parse template specific options

This patch converts affile to use the template_option rule in cfg-grammar
and LogTemplateOptions. At the same time:

  - it uses the same LogTemplateOptions for generating filenames and
    content (one with LTZ_LOCAL the other with LTZ_SEND), it shouldn't
    really matter, previously ts-format() and frac-digits() would not
    have propagated into filename formatting, however those are hardly
    being used in filenames and the other destinations similarly use
    the same set of settings in similar situations (sql table
    names for instance)
  - local-time-zone() setting should work again (was completely broken)

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afsql: move AFSqlDestDriver declaration into the header

As the grammar will need it.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afsql: use common code to parse template specific options

This patch converts affile to use the template_option rule in cfg-grammar
and LogTemplateOptions.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
value-pairs: allow setting LogTemplateOptions used for value formatting

This patch introduces value_pairs_set_template_options() which is
a borrowed LogTemplateOptions structure that is going to be used for
formatting value-pairs values. value-pairs defaults to use the global
settings but drivers can override this if they have their
per-destination settings.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
value-pairs: introduce value_pairs_new_default() function

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afamqp: add GlobalConfig as constructor parameter

Instead of relying on the "configuration" global variable, expect this
as a parameter in order to decouple from the config grammar layer.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afmongodb: add GlobalConfig as constructor parameter

Instead of relying on the "configuration" global variable, expect this
as a parameter in order to decouple from the config grammar layer.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afmongodb: use value_pairs_new_default() instead of a driver specific default

A number of drivers use the same set of defaults in value-pairs, use a
common implementation instead of open coding them in all.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afmongodb: create per-driver LogTemplateOptions

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afmongodb: Add support for acting on type hints

Since we have type hints, we should use them. This patch adds support
for all the type hints known so far (except for default, which is
special), along with support for the on-error() setting.

This fixes one part of #6.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
afstomp: add GlobalConfig as constructor parameter

Instead of relying on the "configuration" global variable, expect this
as a parameter in order to decouple from the config grammar layer.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afstomp: use value_pairs_new_default() instead of a driver specific default

A number of drivers use the same set of defaults in value-pairs, use a
common implementation instead of open coding them in all.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afstomp: create per-driver LogTemplateOptions

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afamqp: use value_pairs_new_default() instead of a driver specific default

A number of drivers use the same set of defaults in value-pairs, use a
common implementation instead of open coding them in all.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afamqp: create per-driver LogTemplateOptions

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
scl/Makefile.am: Install SCL files to the correct path

When the build system was changed to a non-recursive form, SCL
installation broke, and an extra scl/ directory got prepended to the
path. This is now corrected.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Mk/Makefile.am: Include all the files in the distribution

Signed-off-by: Gergely Nagy <algernon@balabit.hu>