what system are you compiling on?

David Lang

On Thu, 4 Jun 2015, chenlin rao wrote:

Date: Thu, 4 Jun 2015 17:03:25 +0800
From: chenlin rao <[email protected]>
Reply-To: rsyslog-users <[email protected]>
To: rsyslog-users <[email protected]>
Subject: Re: [rsyslog] can field() return an array instread of string?

try to compile the liblognorm from git master, but got "/lib64 file not
recognized: is a directory" error. When can liblognorm-1.1.2.rpm publish?

2015-05-29 4:00 GMT+08:00 David Lang <[email protected]>:

On Thu, 28 May 2015, chenlin rao wrote:

 The url params string, like

'trim_level=1&uicode=10000002&featurecode=10000001&c=android&i=7029d48&s=875b1623&id=3847479454305937&ua=nubia-NX507J__weibo__5.3.0__android__android4.4.2&wm=2447_4002&v_f=2&v_p=21&from=1053095010&gsid=_2A254Ygi&lang=zh_CN&page=1&skin=default&trim=1&count=20&oldwm=9012_0001&luicode=10000001&with_common_cmt=1&filter_by_author=0'.
I want some functions just like logstash/filters/kv. Or split such string
into an array by '&', then I use `foreach` to process the array?


right now there is not a good way to do this. Things are _almost_ there

rule=:%uri:tokenized:&:char-sep:&%

will split things into an array

{
  "uri": [
    "trim_level=1",
    "uicode=10000002",
    "featurecode=10000001",
    "c=android",
    "i=7029d48",
    "s=875b1623",
    "id=3847479454305937",
    "ua=nubia-NX507J__weibo__5.3.0__android__android4.4.2",
    "wm=2447_4002",
    "v_f=2",
    "v_p=21",
    "from=1053095010",
    "gsid=_2A254Ygi",
    "lang=zh_CN",
    "page=1",
    "skin=default",
    "trim=1",
    "count=20",
    "oldwm=9012_0001",
    "luicode=10000001",
    "with_common_cmt=1",
    "filter_by_author=0"
  ]
}

the problem is splitting things from there.

there is the beginnings of a name-value split in the code, but right now
it's unofficial and not exposed to the user. It may be possible to do
something using the 'iptables' parser in a foreach loop.

There really needs to be an interpret capability that can take the
char-sep:& output and read it as a name-value pair.

David Lang


 2015-05-28 17:33 GMT+08:00 David Lang <[email protected]>:

 On Thu, 28 May 2015, chenlin rao wrote:


 Hi all:
   I want to split my `$.urlargs` into a hash like
`{"k1":"v1","k2":"v2"}`, but field() function only return the matchnbr
substring, how can I got the whole array of kv?


not an immediate help, but the current git version of liblognorm can
parse
JSON directly.

what does $.urlargs currently consist of?

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.

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

_______________________________________________
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