You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2017/07/22 07:47:00 UTC

[jira] [Resolved] (CAMEL-11574) camel-lumberjack should support longs

     [ https://issues.apache.org/jira/browse/CAMEL-11574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-11574.
---------------------------------
    Resolution: Fixed
      Assignee: Claus Ibsen

Thanks for the PR

> 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
>            Assignee: Claus Ibsen
>             Fix For: 2.20.0
>
>
> 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)