On Tue, 4 Aug 2015, chenlin rao wrote:
I saw `substr($fromhost-ip,0,5)` example in the lookup_table functions' offical document. But I can't find any documents about `substr` function self.When I use substr in my rsyslog.conf, the `rsyslogd -N1` testing command return OK, but the result string always be null(""). So, is it a wrong example ,or an un-implement function now?
I'd have to dig through source, Rainer is on vacation for a couple of weeks and the lookup_table functionality was never fully implemented.
In the meantime, you can use the exec_template function to set a variable to the result of a template, and a template can specify substrings.
David Lang _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

