Antoine DESSAIGNE created CAMEL-11574:
-----------------------------------------
Summary: camel-lumberjack should support longs
Key: CAMEL-11574
URL: https://issues.apache.org/jira/browse/CAMEL-11574
Project: Camel
Issue Type: Improvement
Reporter: Antoine DESSAIGNE
Filebeat 5 introduced json parsing options that allow using resources more
efficiently but the {{camel-lumberjack}} component unmarshalling behaves badly
with long values so we can't take advantage of it.
Right now the following log message :
{code}
{"long":1491320561000}
{code}
With the following route
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<routes xmlns="http://camel.apache.org/schema/spring"
xmlns:u="http://www.systar.com/aluminium/camel-util">
<route>
<from uri="lumberjack:0.0.0.0:5044"/>
<log message="just received : ${body}"/>
</route>
</routes>
{code}
Will produce the following console log
{noformat}
just received :.... long=1.491320561E12 .....
{noformat}
instead of
{noformat}
just received :.... long=1491320561000 .....
{noformat}
Even if JSON is _not_ supposed to handle longs, implementations such as Jackson
do support it which is really handy. So switching from Gson to Jackson for JSON
handling we'll be usefull.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)