Just quickly, as I am deeply into design issues of the rule engine that I
will concentrate on over the weekend.


On Sat, Oct 26, 2013 at 1:10 PM, Pavel Levshin <[email protected]> wrote:

>
> 26.10.2013 13:17, Pavel Levshin:
>
>
>> Is it declared somewhere which integer size rsyslog does support? There
>> is a inconsistence between internal number representation, which is signed
>> long long, and JSON-c integers, which is signed int only. So you can use
>> integers in range -2^63 .. 2^63-1 for RainerScript expressions, but
>> variables can hold no more than -2^31 .. 2^31-1.
>>
>
> This appears to be easy to fix. Json-c supports int64 from and uses them
> internally in any case.
>
>
unfortunately not as easy in practice because of:

> Note that this patch requires json-c >= 0.10.
>

That's NOT shipped by many distros. that's the prime reason we keep with
the old version. But if you can add a configure check, we can support it
where available (maybe a call to maintainers to also update the json-c
package...).

Sorry,
Rainer

>
> Ommongodb seems to be prepared for int64, but I haven't tested it. Other
> modules, notably mmcount, left unchanged.
>
> After the patch:
>
>
> set $!min = -2147483648;
> set $!max = 2147483647;
> set $!under = -2147483648 - 1;
> set $!over = 2147483647 + 1;
> set $!under_s = cstr(-2147483648 - 1);
> set $!over_s = cstr(2147483647 + 1);
>
> "min": -2147483648, "max": 2147483647, "under": -2147483649, "over":
> 2147483648, "under_s": "-2147483650", "over_s": "2147483649"
>
>
> set $!under_sj = "-1000000000000";
> set $!over_sj = "1000000000000";
> set $!under_sjn = cstr(cnum($!under_sj));
> set $!over_sjn = cstr(cnum($!over_sj));
> set $!under_sn = cstr(cnum("-1000000000000"));
> set $!over_sn = cstr(cnum("-1000000000000"));
>
> "under_sj": "-1000000000000", "over_sj": "1000000000000", "under_sjn":
> "-1000000000000", "over_sjn": "1000000000000", "under_sn":
> "-1000000000000", "over_sn": "-1000000000000"
>
>
> --
> Pavel Levshin
>
>
> _______________________________________________
> 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