balabit/syslog-ng-3.4 — pull request #6 by algernon (2012-08-17 08:29:49+00:00)
Title: afmongodb: Support connecting to unix sockets

The next version of libmongo-client (0.1.6) will support connecting
via unix sockets, and the mongodb destination driver should follow. To
achieve this, the internal copy was updated to a version that already
supports this, and the minimum required version was also bumped to
0.1.6.

With that in place, the path() option is introduced, which, when set,
will tell the driver to connect via the specified path to a unix
socket. It does this by setting port to MONGO_CONN_LOCAL, that's how a
path is recognised by libmongo-client.

However, setting path() conflicts with host(), port() and servers():
the first cannot be used when any of the other three was previously
set, nor the other way around. The configuration grammar was updated
to notice this case, and bail out with an error if such a scenario is
detected.

Based on the work of Conrad Hoffmann .

Signed-off-by: Gergely Nagy