Skip to content

Support nanosecond-precision timestamps#1634

Merged
tstack merged 2 commits intotstack:masterfrom
Yukigaru:fix-nanosecond-parsing
Mar 2, 2026
Merged

Support nanosecond-precision timestamps#1634
tstack merged 2 commits intotstack:masterfrom
Yukigaru:fix-nanosecond-parsing

Conversation

@Yukigaru
Copy link
Contributor

@Yukigaru Yukigaru commented Feb 28, 2026

At job we use nanosecond precision timestamps:

2026-02-27 00:00:24.078105853 DEBUG ...text...

But lnav doesn't support them, which leads to:

  • time-based navigation broken (:goto <timestamp> doesn't work)
  • breadcrumb bar shows file mtime instead of parsed timestamp for every line
  • histogram view collapses all lines into a single bucket

The root cause is the generic_log format regex expects only up to 6 digits (\d{1,6}) instead of possible 9.

Fix tested.
Tests run exactly as in master (3 fails, not connected to this change).
Example file: bug_nanos.log

@Yukigaru Yukigaru force-pushed the fix-nanosecond-parsing branch 3 times, most recently from 8ea66dd to 3f0b550 Compare February 28, 2026 19:17
@Yukigaru Yukigaru force-pushed the fix-nanosecond-parsing branch from 3f0b550 to 9119ff8 Compare March 2, 2026 09:48
@tstack tstack merged commit 5ab61f4 into tstack:master Mar 2, 2026
2 of 5 checks passed
@tstack
Copy link
Owner

tstack commented Mar 2, 2026

Looks good and thanks for including a test! Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants