VERSION: Bump to 3.7.0alpha0

We opened the 3.6/master branch already, lets bump the version here, to
avoid any confusion when new things start get merged here.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure.ac: Improved the linux capability check

The Linux capabilities check was dependent only on the existence of
<sys/capability.h>. While there was a check performed for -lcap and its
usability, if that check failed, linux capability support was never
turned off.

This caused problems on recent FreeBSDs, where the header exists, but -
naturally - the library does not. This patch fixes #175, by modifying
the check to turn off the feature if the library is not available.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure.ac: Fix --enable-linux-caps

While fixing the auto-detection of Linux capabilities,
--enable-linux-caps got broken. This patch corrects that, so that both
work now.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge tag 'syslog-ng-3.6.0alpha2'

syslog-ng 3.6.0alpha2 release

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
NEWS.md: Drop 3.6 news, they're irrelevant on master

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
versioning: introduce syslog-ng version 3.7

This patch changes the default config version to 3.7 and adds related
defines.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
templates.h: add inclusion of plugin.h

Macros in templates.h may use the plugin API, which is thus a dependency,
include that so that the call-site doesn't need to.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
test_template_compile: create get_template_function_ops()

This new function makes it easier to describe LTE_FUNC elements.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
templates.c: extract log_template_prepare_function_call()

In order to make log_template_add_func_elem() easier to read (and to prepare
a new feature there), extract log_template_prepare_function_call()
that sets up the template function invocation given the implementing
plugin.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
templates.c: extract log_template_lookup_and_setup_function_call()

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Merge pull request #207 from balabit/f/template-related-refactors

F/template related refactors
messages: add msg_warning_once() macro

This patch implements msg_warning_once() macro, that causes the warning
to be printed once per syslog-ng execution. This pattern is being
used at a number of places in syslog-ng, but so far has been open-coded
at all sites. This macro makes it possible to refactor all such sites,
reducing the code considerably.

Signed-off-by: Balazs Scheidler <bazsi@balabit.com>
global: use msg_warning_once() instead of open coding the same

Signed-off-by: Balazs Scheidler <bazsi@balabit.com>
cfg: display warning about duplicate configuration elements only once

Signed-off-by: Balazs Scheidler <bazsi@balabit.com>
afmongodb: remove exclamation from warning messages

All other warning call sites use WARNING: and not WARNING!, do the same in
the mongo driver too.

Signed-off-by: Balazs Scheidler <bazsi@balabit.com>
dbparser: only display the change in inject-mode() once per startup

Signed-off-by: Balazs Scheidler <bazsi@balabit.com>
Merge pull request #208 from balabit/f/msg-warning-refactor

F/msg warning refactor
cfg-tree: increase buffer for formatting the location in debug messages

Signed-off-by: Balazs Scheidler <bazsi@balabit.com>
cfg-tree: add log_expr_node_location_tag() function

This new function formats a "location" tag to be emitted as a name-value
pair associated with an internal message. This makes it trivial
to add this information to internal messages.

Signed-off-by: Balazs Scheidler <bazsi@balabit.com>
logpipe: add log_pipe_location_tag() function

This function formats a "location" tag to be emitted as a name-value
pair of internal messages.

Signed-off-by: Balazs Scheidler <bazsi@balabit.com>