Coder Social home page Coder Social logo

Timestamp is not in order about nanolog HOT 6 CLOSED

platformlab avatar platformlab commented on July 16, 2024
Timestamp is not in order

from nanolog.

Comments (6)

syang0 avatar syang0 commented on July 16, 2024

Hi kaiduanx,

I think the issue is related to #28 where log messages at the beginning of the file can sometimes have a negative nanosecond timestamp (notice the little dash character - after the decimal point). The timestamps are still in order; it's just that nanosecond count is printed out as a negative value. I suspect the fix may be just to add an if-condition in the decompressor to check for this case. However, I'm not able to reproduce the problem on my setup.

Could you send me your log file, so I can verify the fix?

Best Regards,
Stephen Yang

from nanolog.

kaiduanx avatar kaiduanx commented on July 16, 2024

Please send an email to [email protected], I will send the file to you.

from nanolog.

syang0 avatar syang0 commented on July 16, 2024

Actually, can you post the file here? You can attach files to GitHub comments; simply drag the file into the text field.

Instructions: https://docs.github.com/en/github/managing-your-work-on-github/file-attachments-on-issues-and-pull-requests

Example File: ProofOfConcept.txt

from nanolog.

kaiduanx avatar kaiduanx commented on July 16, 2024

logFile.log

from nanolog.

syang0 avatar syang0 commented on July 16, 2024

Hey kaiduanx,

The problem should be fixed now. Give it a try and let me know if it works.

Best Regards,
Stephen Yang

from nanolog.

kaiduanx avatar kaiduanx commented on July 16, 2024

@syang0 , the problem is fixed, please see the following log. Many thanks, @syang0

~/NanoLog/sample$ ./decompressor decompress /tmp/logFile
2020-07-17 09:34:53.999992889 main.cc:59 NOTICE[0]: A string, pointer, number, and float: 'Hello World', 0x7ffdf907d2dc, 512, 3.141590
2020-07-17 09:34:53.999993750 main.cc:64 NOTICE[0]: Shortend String: 'Hello World' and shortend float 3.14

Decompression Complete after printing 2 log messages

from nanolog.

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.