流利位 TCP json 解析器,用于固定在 32 位最大整数上的大整数
fluent-bit TCP json parser for large integers pegged at 32bit maxint
给定以下配置文件:
[INPUT]
Name tcp
Listen 0.0.0.0
Port 5170
Format json
[OUTPUT]
Name stdout
Match *
运行 Windows 上的流利位并发送字符串 {"key": 291000741888 }
输出为 [0] tcp.0: [1620860835.385804900, {"key"=>2147483647}]
(值固定为 32 位最大整数)
有没有办法配置 fluent-bit 来处理 64 位整数?
代码使用了 atol
。对于 Windows cpp long
是一个 32 位整数。参见 https://docs.microsoft.com/en-us/cpp/cpp/data-type-ranges。
给定以下配置文件:
[INPUT]
Name tcp
Listen 0.0.0.0
Port 5170
Format json
[OUTPUT]
Name stdout
Match *
运行 Windows 上的流利位并发送字符串 {"key": 291000741888 }
输出为 [0] tcp.0: [1620860835.385804900, {"key"=>2147483647}]
(值固定为 32 位最大整数)
有没有办法配置 fluent-bit 来处理 64 位整数?
代码使用了 atol
。对于 Windows cpp long
是一个 32 位整数。参见 https://docs.microsoft.com/en-us/cpp/cpp/data-type-ranges。