You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/21 13:15:00 UTC
[jira] [Commented] (CAMEL-11574) camel-lumberjack should support
longs
[ https://issues.apache.org/jira/browse/CAMEL-11574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096224#comment-16096224 ]
ASF GitHub Bot commented on CAMEL-11574:
----------------------------------------
GitHub user adessaigne opened a pull request:
https://github.com/apache/camel/pull/1839
CAMEL-11574 - Switch lumberjack from Gson to Jackson in order to support long JSon values
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/adessaigne/camel CAMEL-11574
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1839.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1839
----
commit 38bd1d3ebc09e78ac7b6d6aa244c7d91e22d94af
Author: Antoine DESSAIGNE <an...@gmail.com>
Date: 2017-07-21T13:13:18Z
CAMEL-11574 - Switch lumberjack from Gson to Jackson in order to support long JSon values
----
> 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)