Coder Social home page Coder Social logo

Comments (2)

repeatedly avatar repeatedly commented on July 23, 2024

It because JSON/MessagePack doesn't have timestamp format.
How about using 3 arguments version of log method to specify timestamp?

https://github.com/fluent/fluent-logger-java/blob/ea176c24f2a05bcc842c156675e00a8fd349a39c/src/main/java/org/fluentd/logger/FluentLogger.java#L89

Do you want to store Fluentd's event time and timestamp separately?

from fluent-plugin-mongo.

passos avatar passos commented on July 23, 2024

em, thanks. I just found that it's actually my mistake.

I make a HashMap<String, String> to store log data, use Gson to convert it to JSON format, post it to server from mobile client, then restore the Map from this JSON String and use this map in fluentd logger.

The problem is the original Map's type is <String, String> instead of <String, Object> so that the number is presented as String when it is converted to JSON string.

The code I post in the question actually works correctly.

from fluent-plugin-mongo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.