This was pretty much copied from string-to, so if a free is needed for this, it's needed for a lot of the other simple parsers.

the initialization should be taking place when it's loaded from the ed (again, same as string-to)

David Lang

On Tue, 2 Jun 2015, singh.janmejay wrote:

Impl looks good, but it leaks memory (you want to free the toFind in
both cases, and NULL initialize it).

Also, you probably want to add some tests.

On Tue, Jun 2, 2015 at 2:56 AM, David Lang <[email protected]> wrote:
On Fri, 29 May 2015, David Lang wrote:

On Fri, 29 May 2015, Rainer Gerhards wrote:

2015-05-29 13:53 GMT+02:00 singh.janmejay <[email protected]>:

Should we have an optional argument in word: except.

Eg.

%foo:word:&%%bar:word%

Given baz&quux will give us:

{"foo" : "baz", "bar": "quux"}

If we take multiple chars (allow escaped unicode sequences), we can
say the default value of this field is 'space' and 'tab'.


isn't that char-to? At least that was what I added char-to for...


almost, except char-to (and char-sep) don't allow you to specify multiple
characters as the end of the item.

char-sep will fail if you have

a&b c

and do %foo:tokenize:%:char-sep:&% c


attached is a patch that lets you specify multiple characters for char-to
and char-sep, any one of the characters will work, so with the example above

rule=:%foo:tokenize:&:char-sep:& % c

# echo 'a&b c' |./lognormalizer -r del -e json

you get

{ "foo": [ "a", "b" ] }

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.




_______________________________________________
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.

Reply via email to