[Bro] - large double are not printed/written correctly
william de ping
bill.de.ping at gmail.com
Thu Nov 2 05:15:58 PDT 2017
Yes, it seems that bro logging and writing large\small numbers is rounded
I cannot find any workaround besides printing it as a string (which is not
a good approach).
Any suggestions ?
On Mon, Oct 30, 2017 at 4:47 PM, Seth Hall <seth at corelight.com> wrote:
> If you are talking about logging through the logging framework, then
> that's a different code path for value serialization (I think we try and
> avoid scientific notation there). Generally just allowing Bro to serialize
> values how ever it feels like it as you are doing with the bare unformatted
> print statement can occasionally result in some undesirable behavior.
> Are you talking about having this trouble with the logging framework?
> On 29 Oct 2017, at 10:20, william de ping wrote:
>> I have this simple script :
>> event bro_init()
>> local a=-3.019159e-8;
>> print "a",a;
>> local s=fmt("%e",a);
>> print "s",s;
>> results :
>> a, -0
>> s, -3.019159e-08
>> the printing of variable a is important because its -0 once written in a
>> log file.
>> is there anyway of printing\writing large doubles ?
>> Bro mailing list
>> bro at bro-ids.org
> Seth Hall * Corelight, Inc * www.corelight.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Bro