LogViewPlus Support

timestamps in floating point format

https://www.logviewplus.com/forum/Topic2056.aspx

By danielf82 - 2 Feb 2024

Hi,
I tried and failed to parse the timestamps in log files where the format looks like this:

[1706782845.436764] [INFO ] [139899789445120] [Class.cpp@method:548] [Class] Running test class

The first part ([1706782845.436764]) represents a timestamp in seconds and fractions of seconds.
I was able to parse the seconds part and drop the rest, but failed to parse the full timestamp.

Best Regards,
Daniel
By LogViewPlus Support - 2 Feb 2024

Hi Daniel,

I am able to get a good parse using ElapsedDecimal with the pattern:
[%d{ElapsedDecimal}] [%p] [%S] [%S{Source}] [%c] %m%n 



ElapsedDecimal is actually recognized by the Parser Wizard, so you can just highlight the field and select the Mark as Date Time command.



Hope that helps,

Toby
By danielf82 - 5 Apr 2024

I just tried it, and it failed:

By LogViewPlus Support - 5 Apr 2024

Hi Daniel,

It is difficult to see where the problem could be here.  It looks like it may be parsing related rather than a problem with ElapsedDecimal. Can you please provide the sample log entry, or a sample timestamp?

Thanks,

Toby
By LogViewPlus Support - 5 Apr 2024

If I manually update the date in the sample above, it still parses fine with the pattern given:


Are you sure the log file format is the same?
By danielf82 - 5 Apr 2024

Here is a sample log entry I could not parse:

[1712130695.122167] [INFO ] [140305551292416] [SplineControllerLegacy.cpp@cycleCommand:373] [SplineControllerLegacy] New controller state: EXECUTING
By LogViewPlus Support - 5 Apr 2024

It seems to parse OK using the pattern above:





I think there might be an issue with the parser configuration you are using.
By danielf82 - 5 Apr 2024

I found the (probable) issue. I have a german locale set in my windows. This assumes the decimal separator being a comma.
If I replace the dot in the input with a comma, it works. But I have no control over the input format, so I cannot change this.
I found no settings in LogViewPlus that allows for specification of the decimal separator.

By LogViewPlus Support - 7 Apr 2024

I can confirm this is a bug.  We have implemented a fix which will be available as a BETA release later this week.  The fix address this issue as well as other aspects of the code which may have the same problem.

Thanks for bringing this issue to our attention!

Toby
By danielf82 - 8 Apr 2024

Good to know. I almost thought I was going crazy :-)
I am looking forward to the update!
By LogViewPlus Support - 30 Apr 2024

Hi Daniel,

I just wanted to let you know that we have now released LogViewPlus v3.1.9 as a BETA release.

This release addresses the ElapsedDecimal locale issue discussed above.

Thanks again for bringing this issue to our attention.  Please do let me know if you have any further questions or issues.

Toby
By danielf82 - 2 May 2024

Hi Toby,
thanks for the quick turnaround time on this issue.
I tried it and it seems to work fine now.
Thanks again,
Daniel
By LogViewPlus Support - 2 May 2024

Glad to hear it Daniel - thanks for letting me know!

Toby