Merge pull request #8 from talien/feature/lua-destination
lua: Add lua-example.conf and lua-example.lua to EXTRA_DIST

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
.travis.yml: New file

This doesn't do much, but at least verifies that distcheck works.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
.travis.yml: Use aptitude to install syslog-ng-dev

Since syslog-ng-dev depends on syslog-ng-core, which conflicts with
rsyslog, upon with ubuntu-minimal depends, use aptitude to install
syslog-ng-dev, because it can make the right decision.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Makefile.am: Add DISTCLEANFILES

To make distcheck happy, clean up the generated grammar files. We use
some GNU Make trickery to do that, so we won't have repeated code all
over the place.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
README.md: Minor style correction

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
lua: whitespace cleanup
lua: Added mode parameter to lua destination.

The new mode parameter allows two mode: formatted and raw.
The formatted mode is the "legacy" mode in which we can specify a template
and the queue-func gets a formatted message as a string parameter.
In raw mode, the queue-func gets the message as a Lua table, so the fields
of the message can be accessed directly. For example:

function queue_function(msg)
  print('Message:'..msg['MESSAGE'])
  print('Host:'..msg['HOST'])
end

In raw mode, the template parameter of the destination is omitted. Every
field of the message is accessed as string. (even the numeric ones, eg.: PID).