Hi,

I am having problem inserting logs into MySQL using match() that returns more than 10 arguements.


destination d_mysql  {
pipe("/tmp/mysql.pipe"
template("INSERT INTO mydatabase (content_name) VALUES ('$10');\n") template-escape(yes));
};

filter f_filter { match ("^.*?:   \"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)\",\"(.*)$"); };

log { source(s_stunnel); filter(f_filter); destination(d_mysql); };


incoming log message is as followed:
"test1","test2","test3","test4","test5","test6","test7","test8","test9","testN","testN1"

catting mysql.pipe:
$>cat /tmp/mysql.pipe

INSERT INTO mydatabase (content_name) VALUES ('test10');

So instead of 'testN', I am getting the 'test1' appends with 0 which is 'test10'

Thanks for the help!


Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.