balabit/syslog-ng-incubator — pull request #60 by talien (2014-06-15 17:46:27+00:00)
Title: F/lua constant globals and variable params

Globals are now constants as they should ever be. There is a new feature
with the params() option, which works exactly as the old globals(), eg.
uses value pairs, and templates can be used. The result is manifested as a lua
table as the second parameter of the queue func. Although the same result
can be achieved by using raw mode and Template "class" in Lua, using params
is more comfortable in some cases (eg: SCL).

Examples:

conf:

destination d_lua {
lua( queue-func("test_queue") globals( var1("test") ) params( param1("$HOST") ) );
};

lua:

function test_queue(msg, params)
print(msg)
print(params.param1)
end